Signal processing apparatus having first and second registers enabling both to concurrently receive identical information in one context and disabling one to retain the information in a next context

ABSTRACT

A signal processing apparatus includes an electronic processor responsive to a context signal and operable in alternative processing contexts identified by the context signal. First and second registers are connected to the electronic processor to participate in one processing context while retaining information from another processing context until a return thereto. A context switching circuit is connected to the first and second registers and operates to selectively control input and output operations of the registers to and from the electronic processor depending on the processing context. Other devices, systems and methods are also disclosed.

This is a division of application Ser. No. 07/864,776 filed Apr. 7,1992, still pending; which is a division of 07/347,615, filed May 4,1989, now U.S. Pat. No. 5,142,677.

NOTICE

© Copyright 1989 Texas Instruments Incorporated. A portion of thedisclosure of this patent document contains material which is subject tocopyright protection. The copyright owner has no objection to thefacsimile reproduction by anyone of the patent disclosure, as it appearsin the Patent and Trademark Office patent file or records, but otherwisereserves all copyright rights whatsoever.

IN THE CROSS REFERENCE TO RELATED APPLICATIONS:

This application is related to co-assigned application Ser. No.07/347,605, filed, May 4, 1989, pending; application Ser. No.07/347,596, filed May 4, 1989, issued as U.S. Pat. No. 5,072,418;application Ser. No. 07/347,966, filed May 4, 1989, issued as U.S. Pat.No. 5,155,821; application Ser. No. 07/347,968, filed May 4, 1989,abandoned/combined with application Ser. No. 08/001,915, filed Jan. 8,1993, pending; application Ser. No. 07/347,967, filed May 4, 1989,abandoned/combined with application Ser. No. 07,967,942, filed Oct. 28,1992, pending; and Ser. No. 07/347,969, filed May 4, 1989,abandoned/combined with application Ser. No. 07/918,902, filed Jul. 22,1992, pending.

BACKGROUND OF THE INVENTION

A microprocessor device is a central processing unit or CPU for adigital processor which is usually contained in a single semiconductorintegrated circuit or "chip" fabricated by MOS/LSI technology, as shownin U.S. Pat. No. 3,757,306, issued to Gary W. Boone and assigned toTexas Instruments Incorporated. The Boone patent shows a single-chip8-bit CPU including a parallel ALU, registers for data and addresses, aninstruction register and a control decoder, all interconnected using thevon Neumann architecture and employing a bidirectional parallel bus fordata, address and instructions. U.S. Pat. No. 4,074,351, issued to GaryW. Boone and Michael J. Cochran, assigned to Texas InstrumentsIncorporated, shows a single-chip "microcomputer" type device whichcontains a 4-bit parallel ALU and its control circuitry, with on-chipROM for program storage and on-chip RAM for data storage, constructed inthe Harvard architecture. The term microprocessor usually refers to adevice employing external memory for program and data storage, while theterm microcomputer refers to a device with on-chip ROM and RAM forprogram and data storage. In describing the instant invention, the term"microcomputer" will be used to include both types of devices, and theterm "microprocessor" will be primarily used to refer to microcomputerswithout on-chip ROM. Since the terms are often used interchangeably inthe art, however, it should be understood that the use of one of theother of these terms in this description should not be considered asrestrictive as to the features of this invention.

Modern microcomputers can be grouped into two general classes, namelygeneral-purpose microprocessors and special-purposemicrocomputers/microprocessors. General purpose microprocessors, such asthe M68020 manufactured by Motorola, Inc. are designed to beprogrammable by the user to perform any of a wide range of tasks, andare therefore often used as the central processing unit in equipmentsuch as personal computers. Such general-purpose microprocessors, whilehaving good performance for a wide range of arithmetic and logicalfunctions, are of course not specifically designed for or adapted to anyparticular one of such functions. In contrast, special-purposemicrocomputers are designed to provide performance improvement forspecific predetermined arithmetic and logical functions for which theuser intends to use the microcomputer. By knowing the primary functionof the microcomputer, the designer can structure the microcomputer insuch a manner that the performance of the specific function by thespecial-purpose microcomputer greatly exceeds the performance of thesame function by the general-purpose microprocessor regardless of theprogram created by the user.

One such function which can be performed by a special-purposemicrocomputer at a greatly improved rate is digital signal processing,specifically the computations required for the implementation of digitalfilters and for performing Fast Fourier Transforms. Because suchcomputations consist to a large degree of repetitive operations such asinteger multiply, multiple-bit shift, and multiply-and-add, aspecial-purpose microcomputer can be constructed specifically adapted tothese repetitive functions. Such a special-purpose microcomputer isdescribed in U.S. Pat. No. 4,577,282, assigned to Texas InstrumentsIncorporated and incorporated herein by reference. The specific designof a microcomputer for these computations has resulted in sufficientperformance improvement over general purpose microprocessors to allowthe use of such special-purpose microcomputers in real-timeapplications, such as speech and image processing.

Digital signal processing applications, because of their computationintensive nature, also are rather intensive in memory access operations.Accordingly, the overall performance of the microcomputer in performinga digital signal processing function is not only determined by thenumber of specific computations performed per unit time, but also by thespeed at which the microcomputer can retrieve data from, and store datato, system memory. Prior special-purpose microcomputers, such as the onedescribed in said U.S. Pat. No. 4,577,282, have utilized modifiedversions of a Harvard architecture, so that the access to data memorymay be made independent from, and simultaneous with, the access ofprogram memory. Such architecture has, of course provided for additionalperformance improvement.

The increasing demands of technology and the marketplace make desirableeven further structural and process improvements in processing devices,application systems and methods of operation and manufacture.

Among the objects of the present invention are to provide improved dataprocessing devices, systems and methods that reduce competition ofcompare functions and arithmetic computation functions for processorresources; to provide improved data processing devices, systems andmethods that simplify operations and provide architectural solutionsthat increase processing efficiency where intensive computation andcomparison operations coexist; to provide improved data processingdevices, systems and methods with applications to improved gaincontrols; and to provide improved data processing devices, systems andmethods to better adapt computers to pattern recognition, complexinformation processing and control generally.

SUMMARY OF THE INVENTION

In general, one form of the invention is a data processing deviceincluding an instruction decoder and an arithmetic logic unit havingfirst and second inputs and an output. An accumulator is connectedbetween the output and first input of the arithmetic logic unit. Afurther register is connected between the accumulator and the secondinput of the arithmetic logic unit. The arithmetic logic unit includescircuitry for computing a digital value to the accumulator as well as anadditional circuit. The additional circuit thereupon compares the valueat the second input from said register with the digital value in theaccumulator in response to a command from the instruction decoder andthen stores to the register the lesser or the greater in value of thecontents of the register and the digital value in the accumulatordepending on the command.

Other device, system and method forms of the invention are alsodisclosed and claimed herein. Other objects of the invention aredisclosed and still other objects will be apparent from the disclosureherein.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The preferred embodiments of the inventionas well as other features and advantages thereof will be best understoodby reference to the detailed description which follows, read inconjunction with the accompanying drawings, wherein:

FIGS. 1A and 1B are two halves of an electrical diagram in block form ofan improved microcomputer device including a CPU or central processorunit formed on a single semiconductor chip

FIG. 2 is a block diagram of an improved industrial process andprotective control system;

FIG. 3 is a partially pictorial partially block electrical diagram of animproved automotive vehicle system;

FIG. 4 is an electrical block diagram of an improved motor controlsystem;

FIG. 5 is an electrical block diagram of another improved motor controlsystem;

FIG. 6 an electrical block diagram of yet another improved motor controlsystem;

FIG. 7 is an electrical block diagram of an improved robotic controlsystem;

FIG. 8 is an electrical block diagram of an improved satellitetelecommunications system;

FIG. 9 is an electrical block diagram of an improved echo cancellingsystem for the system of FIG. 8;

FIG. 10 is an electrical block diagram of an improved modem transmitter;

FIG. 11 is an electrical block diagram equally representative ofhardware blocks or process blocks for the improved modem transmitter ofFIG. 10;

FIG. 12 is an electrical block diagram equally representative ofhardware blocks or process blocks for an improved modem receiver;

FIG. 13 is an electrical block diagram of an improved system including ahost computer and a digital signal processor connected for PCM (pulsecode modulation) communications;

FIG. 14 is an electrical block diagram of an improved video imagingsystem with multidimensional array processing;

FIG.. 15 is an electrical block diagram equally representative ofhardware blocks or process blocks for improved graphics, image and videoprocessing;

FIG. 16 is an electrical block diagram of a system for improvedgraphics, image and video processing;

FIG. 17 is an electrical block diagram of an improved automatic speechrecognition system;

FIG. 18 is an electrical block diagram of an improved voloder-modemsystem with encryption;

FIG. 19 is a series of seven representations of an electronic registerholding bits of information and illustrating bit manipulation operationsof a parallel logic unit improvement of FIG. 1B;

FIG. 20 is an electrical block diagram of an improved system forhigh-sample rate digital signal processing;

FIG. 21 is an electrical block diagram of a architecture for an improveddata processing device including the CPU of FIGS. 1A and 1B;

FIG. 22 a schematic diagram of a circuit for zero-overhead interruptcontext switching;

FIG. 23 is a schematic diagram of an alternative circuit forzero-overhead interrupt context switching;

FIG. 24 is a schematic diagram of another alternative circuit forzero-overhead interrupt context switching;

FIG. 25 is a flow diagram of a method of operating the circuit of FIG.24;

FIG. 26 is a block diagram of an improved systems including memory andI/O peripheral devices interconnected without glue logic to a dataprocessing device of FIGS. 1A and 1B having software wait states onaddress boundaries;

FIG. 27 is a partially block, partially schematic diagram of a circuitfor providing software wait states on address boundaries;

FIG. 28 is a process flow digram illustrating instructions forautomatically computing a maximum or a minimum in the data processingdevice of FIGS. 1A and 1B;

FIG. 29 is a partially graphical, partially tabular diagram ofinstructions versus instruction cycles for illustrating a pipelineorganization of the data processing device of FIGS. 1A and B;

FIG. 30 is a further diagram of a pipeline of FIG. 29 comparingadvantageous operation of a conditional instruction to the operation ofa conventional instruction;

FIG. 31 is an electrical block diagram of an improved video system witha digital signal processor performing multiple-precision arithmeticusing conditional instructions having the advantageous operationillustrated in FIG. 30;

FIG. 32 is a block diagram of status bits and mask bits of a conditionalinstruction such as a conditional branch instruction;

FIG. 33 is a block diagram of an instruction register and an instructiondecoder lacking provision for status and mask bits;

FIG. 34 is a block diagram detailing part of the improved dataprocessing device of FIG. 1A having an instruction register and decoderwith provision for conditional instructions with status and mask bits;

FIG. 35 is a partially schematic, partially block diagram of circuitryfor implementing the status and mask bits of FIGS. 32 and 34;

FIG. 36 is a pictorial of an improved pin-out or bond-out configurationfor a chip carrier for the data processing device of FIGS. 1A and 1Billustrating improvements applicable to configurations for electronicparts generally;

FIG. 37 is a pictorial view of four orientations of the chip carrier ofFIG. 36 on a printed circuit in manufacture;

FIG. 38 is a pictorial of an automatic chip socketing machine and testarea for rejecting and accepting printed circuits of FIG. 37 inmanufacture;

FIG. 39 is a processing method of manufacture utilizing the system ofFIG. 38;

FIG. 40 is a version of the improved pin-out configuration a singlein-line type of chip;

FIG. 41 is another version of the improved pin-out configuration;

FIG. 42 is a pictorial of a dual in-line construction wherein theimproved pin-out configuration is applicable and showing translationarrows; and

FIG. 43 is a pictorial of some pins of a pin grid array constructionwherein the improved pin-out configuration is applicable.

Corresponding numerals and other symbols refer to corresponding parts inthe various figures of drawing except where the context indicatesotherwise.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

An architectural overview first describes a preferred embodiment digitalsignal processing device 11.

The preferred embodiment digital signal processing device 11 of FIGS. 1Aand 1B implements a Harvard-type architecture that maximizes processingpower by maintaining two separate memory bus structures, program anddata, for full-speed execution. Instructions are included to providedata transfers between the two spaces.

The device 11 has a program addressing circuit 13 and an electroniccomputation circuit 15 comprising a processor. Computation circuit 15performs two's-complement arithmetic using a 32 bit ALU 21 andaccumulator 23. The ALU 21 is a general-purpose arithmetic logic unitthat operates using 16-bit words taken from a data memory 25 of FIG. 1Bor derived from immediate instructions or using the 32-bit result of amultiplier 27. In addition to executing arithmetic instructions, the ALU21 can perform Boolean operations. The accumulator 23 stores the outputfrom the ALU 21 and provides a second input to the ALU 21 via a path 29.The accumulator 23 is illustratively 32 bits in length and is dividedinto a high-order word (bis 31 through 16) and a low-order word (bits 15through 0). Instructions are provided for storing the high and low orderaccumulator words in data memory 25. For fast, temporary storage of theaccumulator 23 there is a 32-bit accumulator buffer ACCB 31.

In addition to the main ALU 21 there is a Peripheral Logic Unit (PLU) 41in FIG. 1B that provides logic operations on memory locations withoutaffecting the contents of the accumulator 23. The PLU 41 providesextensive bit manipulation ability for high-speed control purposes andsimplifies bit setting, clearing, and testing associated with controland status register operations.

The multiplier 27 of FIG. 1A performs a 16=16 bit two's complementmultiplication with a 32-bit result in a single instruction cycle. Themultiplier consists of three elements: a temporary TREG0 register 49,product register PREG 51 and multiplier array 53. The 16-bit TREG0register 49 temporarily stores the multiplicand; the PREG register 51stores the 32-bit product. Multiplier values either come from datamemory 25, from a program memory 61 when using the MAC/MACDinstructions, or are derived immediately from the MPYK (multiplyimmediate) instruction word.

Program memory 61 is connected at addressing inputs to a program addressbus 101A. Memory 61 is connected at its read/write input/output to aprogram data bus 101D. The fast on-chip multiplier 27 allows the device11 to efficiently perform fundamental DSP operations such asconvolution, correlation, and filtering.

A processor scaling shifter 65 has a 16-bit input connected to a databus 111D via a multiplexer (MUX) 73, and a 32-bit output connected tothe ALU 21 via a multiplexer 77. The scaling shifter 65 produces aleft-shift of 0 to 16 bits on the input data, as programmed byinstruction or defined in a shift count register (TREG1) 81. The LSBs(least significant bits) of the output are filled with zeros, and theMSBs (most significant bits) may be either filled with zeros orsign-extended, depending upon the state of the sign-extension mode bitSXM of the status register ST1 in a set of registers 85 of FIG. 1B.Additional shift capabilities enable the processor 11 to performnumerical scaling, bit extraction, extended arithmetic, and overflowprevention.

Up to eight levels of a hardware stack 91 are provided for saving thecontents of a program counter 93 during interrupts and subroutine calls.Program counter 93 is selectively loaded upon a context change via a MUX95 from program address bus 101A or program data bus 101D. The PC 93 iswritten to address bus 101A or pushed onto stack 91. On interrupts,certain strategic registers (accumulator 23, product register 51, TREG049, TREG1, TREG2, and in register 113: ST0, ST1, PMST, ARCR, INDX andCMPR) are pushed onto a one deep stack and popped upon interrupt return;thus providing a zero-overhead, interrupt context switch. The interruptsoperative to save the contents of these registers are maskable.

The functional block diagram shown in FIGS. 1A and 1B outlines theprincipal blocks and data paths within the processor. Further details ofthe functional blocks are provided hereinbelow. Refer to Table A-1, theinternal hardware summary, for definitions of the symbols used in FIGS.1A and 1B.

The processor architecture is built around two major buses (couples):the program bus 101A and 101D and the data bus 111A and 111D. Theprogram bus carries the instruction code and immediate operands fromprogram memory on program data bus 101D. Addresses to program memory 61are supplied on program address bus 101A. The data bus includes dataaddress bus 111A and data bus 111D. The latter bus 111D interconnectsvarious elements, such as the central Arithmetic Logic Unit (CALU) 15and an auxiliary register file 115 and registers 85, to the data memory25. Together, the program and data buses 101 and 111 can carry data fromon-chip data memory 25 and internal or external program memory 61 to themultiplier 27 in a single cycle for multiply/accumulate operations. Datamemory 25 and registers 85 are addressed via data address bus 111A. Acore register address decoder 121 is connected to data address bus 111Afor addressing registers 85 and all other addressable CPU coreregisters.

The processor 13, 15 has a high degree of parallelism; e.g., while thedata is being operated upon by the CALU 15, arithmetic operations areadvantageously implemented in an Auxiliary Register Arithmetic Unit(ARAU) 123. Such parallelism results in a powerful set of arithmeticlogic, and bit manipulation operations that may all be performed in asingle machine cycle.

The processor internal hardware contains hardware for single-cycle16×16-bit multiplication, data shifting and address manipulation.

Table A-1 presents a summary of the internal hardware. This summarytable, which includes the internal processing elements, registers, andbuses, is alphabetized within each functional grouping.

                  TABLE A-1                                                       ______________________________________                                        Internal Hardware                                                             UNIT      SYMBOL     FUNCTION                                                 ______________________________________                                        Accumulator                                                                             ACC(32)    A 32-bit accumulator                                               ACCH(16    accessible in two halves:                                          ACCL(16)   ACCH (accumulator high) and                                                   ACCL (accumulator low). Used                                                  to store the output of the ALU.                          Accumulator                                                                             ACCB(32)   A register used to temporarily                           Buffer               store the 32-bit contents of                                                  the accumulator. This                                                         register has a direct path                                                    back to the ALU and therefore                                                 can be arithmetically or                                                      logically operated with the                                                   ACC.                                                     Arithmetic                                                                              ALU        A 32-bit two's complement                                Logic Unit           arithmetic logic unit having                                                  two 32-bit input ports and one                                                32-bit output port feeding the                                                accumulator.                                             Auxiliary ARAU       A 16-bit unsigned arithmetic                             Arithmetic Unit      unit used to calculate                                                        indirect addresses using the                                                  auxiliary, index, and compare                                                 registers as inputs.                                     Auxiliary ARCR       A 16-bit register used in use                            Register             as a limit to compare indirect                           Compare              address against.                                         Auxiliary AUXREGS    A register file containing                               Register File        eight 16-bit auxiliary                                                        registers (AR0-AR7), used for                                                 indirect data address                                                         pointers, temporary storage,                                                  or integer arithmetic                                                         processing through the ARAU.                             Auxiliary ARP        A 3-bit register used as a                               Register             pointer to the currently                                 Pointer              selected auxiliary register.                             Block Repeat                                                                            BRCR       A 16-bit memory-mapped                                   Counter              counter register used as a                               Register             limit to the number of times                                                  the block is to be repeated.                             Block Repeat                                                                            PAER       A 16-bit memory-mapped                                   Counter              register containing the end                              Register             address of the segment of code                                                being repeated.                                          Block Repeat                                                                            PASR       A 16-bit memory-mapped                                   Address Start        register containing the start                            Register             address of the segment of code                                                being repeated.                                          Bus Interface                                                                           BIM        A buffered interface used to                             Module               pass data between the data and                                                program buses.                                           Central   CALU       The grouping of the ALU,                                 Arithmetic           multiplier, accumulator, and                             Logic Unit           scaling shifters.                                        Circular  CBCR       An 8-bit register used to                                Buffer Control       enable/disable the circular                              Register             buffers and define which                                                      auxiliary registers are mapped                                                to the circular buffers.                                 Circular  CBER1      Two 16-bit registers                                     Buffer End           indicating circular buffer                               Address              end addresses. CBER1 and                                                      CBER2 are associated with                                                     circular buffers one and two                                                  respectively.                                            Circular Buffer                                                                         CBSR1      Two 16-bit registers                                     Start Address                                                                           CBSR2      indicating circular buffer                                                    start addresses. CBSR1/CBSR2                                                  are associated with circular                                                  buffers one and two                                                           respectively.                                            Data Bus  DATA       A 16-bit bus used to route                                                    data.                                                    Data Memory                                                                             DATA       This block refers to data                                          MEMORY     memory used with the core and                                                 defined in specific device                                                    descriptions. It refers to                                                    both on and off-chip memory                                                   blocks accessed in data memory                                                space.                                                   Data Memory                                                                             DMA        A 7-bit register containing                              Address              the immediate relative address                           Immediate            within a data page.                                      Register                                                                      Data Memory                                                                             DP(9)      A 9-bit register containing                              Page Pointer         the address of the current                                                    page. Data pages are 128                                                      words each, resulting in 512                                                  pages of addressable data                                                     memory space (some locations                                                  are reserved).                                           Direct Data                                                                             DATA       A 16-bit bus that carries the                            Memory    ADDRESS    direct address for the data                              Address              memory, which is the                                     Bus                  concatenation of the DP                                                       register and the seven LSBs of                                                the instruction (DMA).                                   Dynamic Bit                                                                             DBMR       A 16-bit memory-mapped                                   Manipulation         register used as an input to                             Register             PLU.                                                     Dynamic   TREG2      A 4-bit register that holds a                            Bit Pointer          dynamic bit pointer for the                                                   BITT instruction.                                        Dynamic   TREG1      A 5-bit register that holds a                            Shift Count          dynamic prescaling shift count                                                for data inputs to the ALU.                              Global Memory                                                                           GREG(8)    An 8-bit memory-mapped                                   Allocation           register for allocating the                              Register             size of the global memory                                                     space.                                                   Interrupt Flag                                                                          IFR(16)    A 16-bit flag register used to                           Register             latch the active-low                                                          interrupts. The IFR is a                                                      memory mapped register.                                  Interrupt Mask                                                                          IMR(16)    A 16-bit memory mapped                                   Register             register used to mask                                                         interrupts.                                              Multiplexer                                                                             MUX        A bus multiplexer used to                                                     select the source of operands                                                 for a bus or execution unit.                                                  The MUXs are connected via                                                    instructions.                                            Multiplier                                                                              MULTI-     A 16 × 16 bit parallel                                       PLIER      multiplier.                                              Peripheral                                                                              PLU        A 16-bit logic unit that                                 Logic Unit           executes logic operations from                                                either long immediate operands                                                or the contents of the DBMR                                                   directly upon data locations                                                  without interfering with the                                                  contents of the CALU                                                          registers.                                               Prescaler COUNT      A 4-bit register that contains                           Count Register       the count value for the                                                       prescaling operation. This -  register is loaded                              from either                                                                   the instruction or the dynamic                                                shift count when used in                                                      prescaling data. In                                                           conjunction with the BIT and                                                  BITT instructions, it is                                                      loaded from the dynamic bit                                                   pointer of the instruction.                              Product   PREG(32)   A 32-bit product register used                           Register             to hold the multiplier                                                        product. The high and low                                                     words of the PREG can also be                                                 accessed individually using                                                   the SPH/SPL (store P register                                                 high/low) instructions.                                  Product   BPR(32)    A 32-bit register used for                               Register Buffer      temporary storage of the                                                      product register. This                                                        register can also be a direct                                                 input to the ALU.                                        Program Bus                                                                             PROG       A 16-bit bus used to route                                         DATA       instructions (and data for the                                                MAC and MACD instructions).                              Program   PC(16)     A 16-bit program counter used                            Counter              to address program memory                                                     sequentially. The PC always                                                   contains the address of the                                                   next instruction to be                                                        executed. The PC contents are                                                 updated following each                                                        instruction decode operation.                            Program   PROGRAM    This block refers to program                             Memory    MEMORY     memory used with the core and                                                 defined in specific device                                                    descriptions. It refers to                                                    both on and off-chip memory                                                   blocks accessed in program                                                    memory space.                                            Program   PROG AD-   A 16-bit bus that carries the                            Memory    DRESS      program memory address.                                  Address Bus                                                                   Prescaling                                                                              PRE-       A 0 to 16-bit left barrel                                Shifter   SCALER     shifter used to prescale data                                                 coming into the ALU. Also                                                     used to align data for                                                        multi-precision operations.                                                   This shifter is also used as a                                                0-16 bit right barrel shifter                                                 of the ACC.                                              Postscaling                                                                             POST-      A 0-7 bit left barrel shifter                            Shifter   SCALER     used to post scale data coming                                                out of the CALU.                                         Product   P-SCALER   A 0, 1, 4-bit left shifter                               Shifter              used to remove extra sign bits                                                (gained in the multiply                                                       operation) when using fixed                                                   point arithmetic. A 6-bit                                                     right shifter used to scale                                                   the products down to avoid                                                    overflow in the accumulation                                                  process.                                                 Repeat    RPTC(16)   An 8-bit counter to control                              Counter              the repeated execution of a                                                   single instruction.                                      Stack     STACK      A 8 × 16 hardware stack used                                            to store the PC during                                                        interrupts and calls. The                                                     ACCL and data memory values                                                   may also be pushed onto the                                                   popped from the stack.                                   Status    ST0, ST1,  Three 16-bit status registers                            Registers PMST,      that contain status and                                            CBCR       control bits.                                            Temporary TREG0      A 16-bit register that                                   Multiplicand         temporarily holds an operand                                                  for the multiplier.                                      Block Move                                                                              BMAR       A 16-bit register that holds                             Address              an address value for use with                            Register             block moves or multiply                                                       accumulates.                                             ______________________________________                                    

There are 28 core processor registers mapped into the data memory spaceby decoder 121. These are listed in Table A-2. There are in additional64 data memory space registers reserved in page zero of data space.These data memory locations are reserved for peripheral controlregisters.

                                      TABLE A-2                                   __________________________________________________________________________    Memory Mapped Registers                                                       ADDRESS                                                                       NAME DEC HEX DESCRIPTION                                                      __________________________________________________________________________         0-3 0-3 RESERVED                                                         IMR   4   4  INTERRUPT MASK REGISTER                                          GREG  5   5  GLOBAL MEMORY ALLOCATION REGISTER                                IFR   6   6  INTERRUPT FLAG REGISTER                                          PMST  7   7  PROCESSOR MODE STATUS REGISTER                                   RPTC  8   8  REPEAT COUNTER REGISTER                                          BRCR  9   9  BLOCK REPEAT COUNTER REGISTER                                    PASR 10  A   BLOCK REPEAT PROGRAM ADDRESS                                                   START REGISTER                                                  PAER 11  B   BLOCK REPEAT PROGRAM ADDRESS END                                               REGISTER                                                        TREG0                                                                              12  C   TEMPORARY REGISTER USED FOR                                                    MULTIPLICAND                                                    TREG1                                                                              13  D   TEMPORARY REGISTER USED FOR                                                    DYNAMIC SHIFT COUNT                                             TREG2                                                                              14  E   TEMPORARY REGISTER USED AS BIT                                                 POINTER IN DYNAMIC BIT TEST                                     DBMR 15  F   DYNAMIC BIT MANIPULATION REGISTER                                AR0  16  10  AUXILIARY REGISTER ZERO                                          AR1  17  11  AUXILIARY REGISTER ONE                                           AR2  18  12  AUXILIARY REGISTER TWO                                           AR3  19  13  AUXILIARY REGISTER THREE                                         AR4  20  14  AUXILIARY REGISTER FOUR                                          AR5  21  15  AUXILIARY REGISTER FIVE                                          AR6  22  16  AUXILIARY REGISTER SIX                                           AR7  23  17  AUXILIARY REGISTER SEVEN                                         INDX 24  18  INDEX REGISTER                                                   ARCR 25  19  AUXILIARY REGISTER COMPARE REGISTER                              CBSR1                                                                              26  1A  CIRCULAR BUFFER 1 START ADDRESS                                                REGISTER                                                        CBER1                                                                              27  1B  CIRCULAR BUFFER 1 END ADDRESS                                                  REGISTER                                                        CBSR2                                                                              28  1C  CIRCULAR BUFFER 2 START ADDRESS                                                REGISTER                                                        CBER2                                                                              29  1D  CIRCULAR BUFFER 2 END ADDRESS                                                  REGISTER                                                        CBCR 30  1E  CIRCULAR BUFFER CONTROL REGISTER                                 BMAR 31  1F  BLOCK MOVE ADDRESS REGISTER                                      __________________________________________________________________________

The processor 13, 15 addresses a total of 64K words of data memory 25.The data memory 25 is mapped into the 96K data memory space and theon-chip program memory is mapped into a 64K program memory space.

The 16-bit data address bus 111A addresses data memory 25 in one of thefollowing two ways:

1) By a direct address bus (DAB) using the direct addressing mode (e.g.ADD 010h), or

2) By an auxiliary register file bus (AFB) using the indirect addressingmode (e.g. ADD*)

3) Operands are also addressed by the contents of the program counter inan immediate addressing mode.

In the direct addressing mode, a 9-bit data memory page pointer (DP) 125points to one of 512 (125-word) pages. A MUX 126 selects on commandeither bus 101D or 111D for DP pointer register portion 125. The datamemory address (dma) specified from program data bus 101D by seven LSBs127 of the instruction, points to the desired word within the page. Theaddress on the DAB is formed by concatenating the 9-bit DP with the7-bit dma. A MUX 129 selectively supplies on command either the ARAU 123output or the concatenated (DP, dma) output to data address bus 111A.

In the indirect addressing mode, the currently selected 16-bit auxiliaryregister AR(ARP) in registers 115 addressee the data memory through theAFB. While the selected auxiliary register provides the data memoryaddress and the data is being manipulated by the CALU 15, the contentsof the auxiliary register may be manipulated through the ARAU 123.

The data memory address map can be extended beyond the 64K-word addressreach of the 16-bit address bus by paging in an additional 32K words viathe global memory interface. By loading the GREG register with theappropriate value, additional memory can be overlaid over the local datamemory starting at the highest address and moving down. This additionalmemory is differentiated from the local memory by the BR- pin beingactive low.

When an immediate operand is used, it is either contained within theinstruction word itself or, in the case of 16-bit immediate operands,the word following the instruction word.

Eight auxiliary registers (AR0-AR7) in the auxiliary registers 115 areused for indirect addressing of the data memory 25 or for temporary datastorage. Indirect auxiliary register addressing allows placement of thedata memory address of an instruction operand into one of the auxiliaryregisters. These registers are pointed to by a three-bit auxiliaryregister pointer (ARP) 141 that is loaded with a value from 0 through 7,designating AR0 through AR7, respectively. A MUX 144 has inputsconnected to data bus 111D and program data bus 101D. MUX 144 isoperated by instruction to obtain a value for ARP 141 from one of thetwo buses 111D and 101D. The auxiliary registers 115 and the ARP 141 maybe loaded either from data memory 25, the accumulator 23, the productregister 51, or by an immediate operand defined in the instruction. Thecontents of these registers may also be stored in data memory 25 or usedas inputs to the main CPU.

The auxiliary register file (AR0-AR7) 115 is connected to the AuxiliaryRegister Arithmetic Unit (ARAU) 123 shown in FIG. 1B. The ARAU 123 mayautoindex the current auxiliary register in registers 115 while the datamemory location is being addressed. Indexing by either +/-1 or by thecontents of an index register 143 or AR0 may be performed. As a result,accessing tables of information by rows or columns does not require theCentral Arithmetic Logic Unit (CALU) 15 for address manipulation, thusfreeing it for other operations.

The index register 143 or the eight LSBs of an instruction register IRare selectively connected to one of the inputs of the ARAU 123 via a MUX145. The other input of ARAU 123 is fed by a MUX 147 from the currentauxiliary register AR (being pointed to by ARP). AR(ARP) refers to thecontents of the current AR pointed to by ARP. The ARAU 123 performs thefollowing functions.

    ______________________________________                                        AR(ARP) + INDX -- AR(ARP)                                                                        Index the current AR by                                                       adding a 16-bit integer                                                       contained in INDX.                                         AR(ARP) - INDX -- AR (ARP)                                                                       Index the current AR by                                                       subtracting a 16-bit                                                          integer contained in INDX.                                 AR(ARP) + 1-- AR(ARP)                                                                            Increment the current AR                                                      by one.                                                    AR(ARP) -1 -- AR(ARP)                                                                            Decrement the current AR                                                      by one.                                                    AR(ARP) -- AR(ARP) Do not modify the current                                                     AR.                                                        AR(ARP) + IR(7-0) -- AR(ARP)                                                                     ADD an 8-bit immediate                                                        value to current AR.                                       AR(ARP) - IR(7-0) -- AR(ARP)                                                                     Subtract an 8-bit immediate                                                   value from current AR.                                     AR(ARP) +          Bit-reversed indexing, add                                 rc(INDX) -- AR(ARP)                                                                              INDX with reverse carry                                                       (rc) propagation.                                          AR(ARP) -          Bit-reversed indexing,                                     rc(INDX) -- AR(ARP)                                                                              subtract INDX with                                                            reverse-carry (rc)                                                            propagation.                                               if (AR(ARP) = ARCR) then                                                                         Compare current AR with                                    TC=1               ARCR and if comparison                                     if (AR(ARP)gt ARCR) then TC=1                                                                    is true then set TC bit of                                 if (AR(ARP)lt ARCR) then TC=1                                                                    the status register (ST1)                                  if (AR(ARP)neq ARCR) then                                                                        to one. If false then                                      TC=1               clear TC.                                                  if(AR(ARP)=CBER)then                                                                             If at end of circular                                      AR(ARP)=CBSR       buffer reload start                                                           address                                                    ______________________________________                                         (-" means "loaded into")                                                 

The index register (INDX) can be added to or subtracted from AR(ARP) onany AR update cycle. This 16-bit register is one of the memory-mappedregisters. This 16-bit register is used to step the address in stepslarger than one and is used in operatios such as addressing down acolumn of a matrix. The auxiliary register compare register (ARCR) isused as a limit to blocks of data and in conjunction with the CMPRinstruction supports logical comparisons between AR(ARP) and ARCR.

Because the auxiliary registers 115 are memory-mapped, they can be actedupon directly by the CALU 15 to provide for more advanced indirectaddressing techniques. For example, the multiplier 27 can be used tocalculate the addresses of three dimensional matrices. There is atwo-machine cycle delay after a CALU load of the auxiliary registeruntil auxiliary registers can be used for address generation.

Although the ARAU 123 is useful for address manipulation in parallelwith other operations, it suitably also serves as an additionalgeneral-purpose arithmetic unit since the auxiliary register file candirectly communicate with data memory. The ARAU implements 16-bitunsigned arithmetic, whereas the CALU implements 32-bit two's complementarithmetic. BANZ and BANZD instructions permit the auxiliary registersto also be used as loop counters.

A 3-bit auxiliary register pointer buffer (ARB) 148 provides storage forthe ARP on subroutine calls.

The processor supports two circular buffers operating at a given time.These two circular buffers are controlled via the Circular BufferControl Register (CBCR) in registers 85. The CBCR is defined as follows:

    ______________________________________                                        BIT    NAME      FUNCTION                                                     ______________________________________                                        0-2    CAR1      Identifies which auxiliary register is                                        mapped to circular buffer 1.                                 3      CENB1     Circular buffer 1 enable=1/disable=0.                                         Set 0 upon reset.                                            4-6    CAR2      Identifies which auxiliary register is                                        mapped to circular buffer 2.                                 7      CENB2     Circular buffer 2 enable=1/disable=0.                                         Set 0 upon reset.                                            ______________________________________                                    

Upon reset (M-rising edge) both circular buffers are disabled. To defineeach circular buffer first load the CBSR1 and CBSR2 with the respectivestart addresses of the buffers and CBER1 and CBER2 with the endaddresses. Then load respective auxiliary registers AR(i1) and AR(i2) inregisters 115 to be used with each circular buffer with an addressbetween the start and end. Finally load CBCR with the appropriateauxiliary register number 11 or 12 for ARP and set the enable bit. Asthe address is stepping through the circular buffer, the update iscompared by ARAU 123 against the value contained in CBER 155. Whenequal, the value contained in CBSR 157 is automatically loaded into theAR auxiliary register AR(i1) or AR(i2) for the respective circularbuffer.

Circular buffers can be used with either incremented or decremented typeupdates. If using increment, then the value in CBER is greater than thevalue in CBSR. When using decrement, the greater value is in the CBSR.The other indirect addressing modes also can be used wherein the ARAU123 tests for equality of the AR and CBER values. The ARAU does notdetect an AR update that steps over the value contained in CBER 155.

As shown in FIG. 1B, the data bus 111D is connected to supply data toMUXes 144 and 126, auxiliary registers 115 and registers CBER 155, INDX143, CBSR 157 and an address register compare register ARCR 159. MUX 145has inputs connected to registers CBER, INDX and ARCR and instructionregister IR for supplying ARAU 123.

The preferred embodiment provides instructions for data and programblock moves and for data move functions that efficiently utilize thememory spaces of the device. A BLDD instruction moves a block withindata memory, and a BLPD instruction moves a block from program memory todata memory. One of the addresses of these instructions comes from adata address generator, and the other comes from either a long immediateconstant or a Block Move Address Register (BMAR) 160. When used with therepeat instructions (RPT/RPTK/RPTR/RPTZ), the BLDD/BLPD instructionsefficiently perform block moves from on-chip or off-chip memory.

A data move instruction DMOV allows a word to be copied from thecurrently addressed data memory location in on-chip RAM to the nexthigher location while the data from the addressed location is beingoperated upon in the same cycle (e.g. by the CALU). An ARAU operationmay also be performed in the same cycle when using the indirectaddressing mode. The DMOV function is useful for implementing algorithmsthat use the Z⁻¹ delay operation, such as convolutions and digitalfiltering where data is being passed through a time window. The datamove function can be used anywhere within predetermined blocks. The MACD(multiply and accumulate with data move) and the LTD (load TREG0 withdata move and accumulate product) instructions use the data movefunction.

TBLR/TBLW (table read/write ) instructions allow words to be transferredbetween program and data spaces. TBLR is used to read words from programmemory into data memory. TBLW is used to write words from data memory toprogram memory.

As described above, the Central Arithmetic Logic Unit (CALU) 15 containsa 16-bit prescaler scaling shifter 65, a 16×16-bit parallel multiplier27, a 32-bit Arithmetic Logic Unit (ALU) 21, a 32-bit accumulator (ACC)23, and additional shifters 169 and 181 at the outputs of both theaccumulator 23 and the multiplier 27. This section describes the CALUcomponents and their functions.

The following steps occur in the implementation of a typical ALUinstruction:

1) Data is fetched from the RAM 25 on the data bus.

2) Data is passed through the scaling shifter 65 and the ALU 21 wherethe arithmetic is performed, and

3) The result is moved into the accumulator 23.

One input to the ALU 21 is provided from the accumulator 23, and theother input is selected from the Product Register (PREG) 51 of themultiplier 27, a Product Register Buffer (BPR) 185, the AccumulatorBuffer (ACCB) 31 or from the scaling shifters 65 and 181 that are loadedfrom data memory 25 or the accumulator 23.

Scaling shifter 65 advantageously has a 16-bit input connected to thedata bus 111D via MUX 73 and a 32-bit output connected to the ALU 21 viaMUX. 77. The scaling shifter prescaler 65 produces a left shift of 0 to16 bits on the input data, as programmed by loading a COUNT register199. The shift count is specified by a constant embedded in theinstruction word, or by a value in register TREG1. The LSBs of theoutput of prescaler 65 are filled with zeros, and the MSBs may be eitherfilled with zeros or sign-extended, depending upon the status programmedinto the SXM (sign-extension mode) bit of status register ST1.

The same shifter 65 has another input path from the accumulator 23 viaMUX 73. When using this path the shifter 65 acts as a 0 to 16 bit rightshifter. This allows the contents of the ACC to be shifted 0 to 16 bitsright in a single cycle. The bits shifted out are lost and the bitsshifted in are either zeros or copies of the original sign bit dependingon the value of the SXM status bit.

The various shifters 65, 169 and 181 allow numerical scaling, bitextraction, extended-precision arithmetic, and overflow prevention.

The 32-bit ALU 21 and accumulator 23 implement a wide range ofarithmetic and logical functions, the majority of which execute in asingle clock cycle in the preferred embodiment. Once an operation isperformed in the ALU 21, the result is transferred to the accumulator 23where additional operations such as shifting may occur. Data that isinput to the ALU may be scaled by the scaling shifter 181.

The ALU 21 is a general-purpose arithmetic unit that operates on 16-bitwords taken from data RAM or derived from immediate instructions. Inaddition to the usual arithmetic instructions, the ALU can even performBoolean operations. As mentioned hereinabove, one input to the ALU isprovided from the accumulator 23, and the other input is selectively fedby MUX 77. MUX 77 selects the Accumulator Buffer (ACCB) 31 or secondlythe output of the scaling shifter 65 (that has been read from data RAMor from the ACC), or thirdly, the output of product scaler 169. Productscaler 169 is fed by a MUX 191. MUX 191 selects either the ProductRegister PREG 51 or the Product Register Buffer 185 for scaler 169.

The 32-bit accumulator 23 is split into two 16--bit segments for storagevia data bus 111D to data memory 25. Shifter 181 at the output of theaccumulator provides a left shift of 0 to 7 places. This shift isperformed while the data is being transferred to the data bus 111D forstorage. The contents of the accumulator 23 remain unchanged. When thepost-scaling shifter 181 is used on the high word of the accumulator 23(bits 16-31), the MSBs are lost and the LSBs are filled with bitsshifted in from the low word (bits 0-15) . When the post-scaling shifter181 is used on the low word, the LSB's are zero filled.

Floating-point operations are provided for applications requiring alarge dynamic range. The NORM (normalization) instruction is used tonormalize fixed point numbers contained in the accumulator 21 byperforming left shifts. The four bits of temporary register TREG1 81define a variable shift through the scaling shifter 65 for theLACT/ADDT/SUBT (load/add-to/subtract from accumulator with shiftspecified by TREG1) instructions. These instructions are useful infloating-point arithmetic where a number needs to be denormalized, i.e.,floating-point to fixed--point conversion. They are also useful inapplications such as execution of an Automatic Gain Control (AGC) goinginto a filter. The BITT (bit test) instruction provides testing of asingle bit of a word in data memory based on the value contained in thefour LSBs of a temporary register TREG2 195.

Registers TREG1 and TREG2 are fed by data bus 111D. A MUX 197 selectsvalues from TREG1, TREG2 or from program data bus 101D and feeds one ofthem to a COUNT register 199. COUNT register 199 is connected to scalingshifter 6M to determine the amount of shift.

The single-cycle 0-to-16-bit right shift of the accumulator 23 allowsefficient alignment of the accumulator for multiprecision arithmetic.This coupled with the 32-bit temporary buffers ACCB on the accumulatorand BPR on the product register enhance the effectiveness of the CALU inmultiprecision arithmetic. The accumulator buffer register (ACCB)provides a temporary storage place for a fast save of the accumulator.ACCB can be also used as an input to the ALU. ACC and ACCB can be storedinto each other. The contents of the ACCB can be compared by the ALUagainst the ACC with the larger/smaller value stored in the ACCB (or inboth ACC and ACCB) for use in pattern recognition algorithms. Forinstance, the maximum or minimum value in a string of numbers isadvantageously found by comparing the contents of the ACCB and ACC, andif the condition is met then putting the minimum or maximum into one orboth registers. The product register buffer (BPR) provides a temporarystorage place for a fast save of the product register. The value storedin the BPR can also be added to/subtracted from the accumulator with theshift specified for the provided shifter 169.

An accumulator overflow saturation mode may be programmed through theSOVM and ROVM (set/reset overflow mode) instructions. When theaccumulator 73 is in the overflow saturation mode and an overflowoccurs, the overflow flag (OVM bit of register ST0) is set and theaccumulator is loaded with either the most positive or the most negativenumber depending upon the direction of the overflow. The value of theaccumulator upon saturation is 07FFFFFFFh (positive) or 0800000000h(negative). If the OVM (overflow mode) status register bit is reset andan overflow occurs, the overflowed results are loaded into theaccumulator with modification. (Note that logical operations do notresult in overflow.)

A variety of branch instructions depend on the status conditions of theALU and accumulator. These status conditions include the V (branch onoverflow) and Z (branch on accumulator equal to zero), L (branch on lessthan zero) and C (branch on carry). In addition, the BACC (branch toaddress in accumulator) instruction provides the ability to branch to anaddress specified by the accumulator (computed goto). Bit testinstructions (BIT and BITT), which do not affect the accumulator, allowthe testing of a specified bit of a word in data memory.

The accumulator has an associated carry bit C in register ST1 that isset or reset depending on various operations within the device. Thecarry bit allows more efficient computation of extended-precisionproducts and additions or subtractions. It is also useful in overflowmanagement. The carry bit is affected by most arithmetic instructions aswell as the single bit shift and rotate instructions. It is not affectedby loading the accumulator, logical operations, or other suchnonarithmetic or control instructions. Examples of carry bit operationare shown in Table A-3.

                  TABLE A-3                                                       ______________________________________                                        Examples of Carry Bit Operation                                               ______________________________________                                         ##STR1##                                                                      ##STR2##                                                                      ##STR3##                                                                     ______________________________________                                    

The value added to or subtracted from the accumulator, shown in theexample of Table A-3 may come from either the input scaling shifter,ACCR, PREG or BPR. The carry bit is set if the result of an addition oraccumulation process generates a carry, or reset to zero if the resultof a subtraction generates a borrow. Otherwise, it is reset after anaddition or set after a subtraction.

The ADDC (add to accumulator with carry) and SUBB (subtract fromaccumulator with borrow) instructions provided use the previous value ofcarry in their addition/subtraction operation. The ADCR (add ACCB toaccumulator with carry) and the SBBR (subtract ACCR from accumulatorwith borrow) also use the previous value of carry C.

An exception to operation of the carry bit is the use of ADD with ashift count of 16 (add to high accumulator) and SUB with a shift countof 16 (subtract from high accumulator) instructions. The case of the ADDinstruction sets the carry bit if a carry is generated, and this case ofthe SUB instruction resets the carry bit if a borrow is generated.Otherwise, neither instruction affects it.

Two branch instructions, BC and BNC, are provided for branching on thestatus of the carry bit. The SETC, CLRC and LST1 instructions can alsobe used to load the carry bit. The carry bit is set to one on a hardwarereset.

The SFL and SFR (in-place one-bit shift to the left/right) instructionsand the ROL and ROR (rotate to the left/right) instructions implementshifting or rotating of the contents of the accumulator through thecarry bit. The SXM bit affects the definition of the SFR (shiftaccumulator right) instruction. When SXM=1, SFR performs an arithmeticright shift, maintaining the sign of the accumulator data. When SXMB=0,SFR performs a logical shift, shifting out the LSBs and shifting in azero for the MSB. The SFL (shift accumulator left instruction is notaffected by the SXM bit and behaves the same in both cases, shifting outthe MSB and shifting in a zero. Repeat (RPT, RPTK, RPTR or RPTZ)instructions may be used with the shift and rotate instructions formultiple-bit shifts.

The 65-bit combination of the accumulator, ACCB, and carry bit can beshifted or rotated as described above using the SFLR, SFRR, RORR andROLR instructions.

The accumulator can also be right-shifted 0-31 bits in two instructioncycles or 0-16 bits in one cycle. The BSAR instruction shifts theaccumulator 1-16 bits based upon the four bit value in the instructionword. The SATL instruction shifts the accumulator to the right basedupon the 4-LSBs of TREG1. The SATH instruction shifts the accumulator16-bits if bit 5 of TREG1 is a one.

The 16×16-bit hardware multiplier 27 computes a signed or unsigned32-bit product in a single machine cycle. All multiply instructions,except MPYU (multiply unsigned) instruction perform a signed multiplyoperation in the multiplier. That is, two numbers being multiplied aretreated as two's-complement numbers, and the result is a 32-bittwo's-complement number. The following three registers are associatedwith the multiplier.

The 16-bit temporary register (TREG0) 49 connected to the data bus thatholds one of the operands for the multiplier.

The 32-bit product register (PREG) 51 that holds the product, and

The 32-bit product buffer (BPR) 185 that is used to temporarily storethe PREG 51.

The output of the product register 51 and product buffer 185 can beleft-shifted according to four product shift modes (PM), which areuseful for implementing multiply/accumulate operations, fractionalarithmetic or justifying fractional products. The PM field of statusregister ST1 specifies the PM shift mode. The product is shifted one bitto compensate for the extra sign bit gained in multiplying two 16-bittwo's-complement numbers (MPY). A four bit shift is used in conjunctionwith an MPYK instruction to eliminate the four extra sign bits gained inmultiplying a 16-bit number times a 13-bit number. The output of PREGand BPR can instead be right-shifted 6 bits to enable the execution ofup to 128 consecutive multiply/accumulates without the possibility ofoverflow. When right shift is specified, the product is sign-extended,regardless of the value of SXM.

An LT (load TREG0) instruction normally loads the TREG0 49 to provideone operand (from the data bus), and the MPY (multiply) instructionprovides the second operand (also from the data bus). A multiplicationcan also be performed with an immediate operand using the MPYKinstruction. In either case, a product can be obtained every two cycles.

Four multiply/accumulate instructions (MAC and MACD, MADS and MADD)fully utilize the computational bandwidth of the multiplier 27, allowingboth operands to be processed simultaneously. A MUX 211 selects eitherdata bus 111D or program data bus 101D to feed a second input ofmultiplier array 53. The data for these operations can be thustransferred to the multiplier each cycle via the program and data buses.This provides for single-cycle multiply/accumulates when used withrepeat (RPT, RPTK, RTPR, RPTZ) instructions. The SQRA (square/add) andSQRS (square/subtract) instructions pass the same value to both inputsof the multiplier for squaring a data memory value.

The MPYU instruction performs an unsigned multiplication, which greatlyfacilitates extended precision arithmetic operations. The unsignedcontents of TREG0 are multiplied by the unsigned contents of theaddressed data memory location, with the result placed in PREG. Thisallows operands of greater than 16 bits to be broken down into 16-bitwords and processed separately to generate products of greater than32-bits.

After the multiplication of two 16-bit numbers, the 32-bit product isloaded into the 32-bit Product Register (PREG) 51. The product from thePREG may be transferred to the ALU, to the Product Buffer (BPR) or todata memory 25 via the SPH (Store Product High) and SPL (Store ProductLow). Temporarily storing the product in BPR for example is vital toefficient execution of algorithms such as the transposed form of the IIR(infinite impulse response) digital filter. Use of BPR avoidsunnecessary subsequent recomputation of the product of the same twooperands.

As discussed above, four product shift modes (PM) are available at thePREG and BPR outputs, which are useful when performingmultiply/accumulate operations, fractional arithmetic, or justifyingfractional products. The PM field of status register ST1 specifies thePM shift mode, as shown below:

    ______________________________________                                        PM            RESULTING SHIFT                                                 ______________________________________                                        00            NO SHIFT                                                        01            LEFT SHIFT OF 1 BIT                                             10            LEFT SHIFT OF 4 BITS                                            11            RIGHT SHIFT OF 6 BITS                                           ______________________________________                                    

Left shifts specified by the PM value are useful for implementingfractional arithmetic or Justifying fractional products. for example,the product of either two normalized, 16-bit, two's-complement numbersor two Q15 numbers contains two sign bits, one of which is redundant.Q15 format, one of the various types of Q format, is a numberrepresentation commonly used when performing operations on non-integernumbers. The single-bit--left-shift eliminates this extra sign bit fromthe product when it is transferred to the accumulator. This results inthe accumulator contents being formatted in the same manner as themultiplicands. Similarly, the product of either a normalized, 16-bit,two's-complement or Q15 number and a 13-bit, two's-complement constant(MPYK) contains five sign bits, four of which are redundant. Here thefour-bit shift property aligns the result as it is transferred to theaccumulator.

Use of the right-shift PM value allows the execution of up to 128consecutive multiply/accumulate operations without the threat of anarithmetic overflow, thereby avoiding the overhead of overflowmanagement. The shifter can be disabled to cause no shift in the productwhen working with integer or 32-bit precision operations. Note that thePM right shift is always sign-extended regardless of the state of SXM.

System control is provided by the program counter 93, hardware stack 91,PC-related hardware, the external reset signal RS-, interrupts to aninterrupt control 231, the status registers, and the repeat counters.The following sections describe the function of each of these componentsin system control and pipeline operation.

The processor has 16-bit Program Counter (PC) 93, and an eight deephardware stack 91 provides PC storage. The program counter 93 addressesinternal and external program memory 61 in fetching instructions. Thestack 91 is used during interrupts and subroutines.

The program counter 93 addresses program memory 61, either on-chip oroff-chip, via the Program Address Bus (PAB) 101A. Through the PAB, aninstruction is addressed in program memory 61 and loaded via programdata bus 101D into the Instruction Register (IR) for a decoder PEA 221.When the IR is loaded, the PC 93 is ready to start the next instructionfetch cycle. Decoder PLA (programmable logic array) 221 has numerousoutputs for controlling the PUJXes and all processor elements in orderto execute the instructions in the processor instruction set. Forexample, decoder PLA 221 feeds command signals to a pipeline controller225 which also has various outputs for implementing the pipelinedprocessing operations so that the processor elements are coordinated intime. The outputs of pipeline controller 225 also include CALL, RET(RETURN), IAQ (interrupt acquisition) and IACK (interrupt acknowledge).

Data memory 25 is addressed by the program counter 93 during a BLKDinstruction, which moves data blocks from one section of data memory toanother. The contents of the accumulator 23 may be loaded into the PC 93in order to implement "computed GOTO" operations. This can beaccomplished using the BACC (branch to address in accumulator) or CALA(call subroutine indirect) instructions.

To start a hew fetch cycle, the PC 93 is loaded either with PC+1 or witha branch address (for instructions such as branches, calls, orinterrupts). In the case of special conditional branches where thebranch is not taken, the PC is incremented once more beyond the locationof the branch immediate. In addition to the conditional branches, theprocessor has a full complement of conditional calls and returns.

The processor 13, 15 operates with a four deep pipeline. This means anydiscontinuity in the PC 93 (i.e., branch call or interrupt) forces thedevice to flush two instructions from the pipeline. To avoid these extracycles, the processor has a full set of delayed branches, calls andreturns. In the delayed operation of the branches, calls or returns, thetwo instructions following the delayed instruction are executed whilethe instructions at the branch address are being fetched, therefore, notflushing the pipeline and giving an effective two cycle branch. If theinstruction following the delayed branch is a two word instruction, thenonly it will be executed.

A further feature allows the execution of the next single instructionN+1 times. N is defined by loading a 16-bit RPTC (repeat counter) inregisters 85. When this repeat feature is used, the instruction isexecuted, and the RPTC is decremented until the RPTC goes to zero. Thisfeature is useful with many instructions, such as NORM (normalizecontents of accumulator), MACD (multiply and accumulate with data move),and SUBC (conditional subtract). When repeating instructions, theprogram address and data buses are freed to fetch a second operand inparallel with the data address and data buses. This allows instructionssuch as MACD and BLKP to effectively execute in a single cycle whenrepeated.

The PC stack 91 is 16-bits wide and eight levels deep. The PC stack 91is accessible through the use of the push and pop instructions. Wheneverthe contents of the PC 93 are pushed onto the top of the stack 91, theprevious contents of each level are pushed do%m, and the bottom (eighth)location of the stack is lost. Therefore, data is lost if more thaneight successive pushes occur before a pop. The reverse happens on popoperations. Any pop after seven sequential pops yields the value of thebottom stack level. All of the stack levels then contain the same value.The two instructions, PSHD and POPD, push a data memory value onto thestack or pop a value from the stack to or from data memory via data bus111D. These instructions allow a stack to be built in data memory forthe nesting of subroutines/interrupts beyond eight levels.

Instruction pipelining involves the sequence of bus operations thatoccurs during instruction execution. The instruction - fetch, decode,operand - fetch, execute pipeline is essentially invisible to the user,except in some cases where the pipeline must be broken (such as forbranch instructions). In the operation of the pipeline the instructionfetch, decode, operand fetch, and execute operations are independentwhich allow instruction executions to overlap. Thus, during any givencycle, one to four different instructions can be active, each at adifferent stage of completion, resulting in a four deep pipeline.

Reset (RS-) is a non-maskable external interrupt that can be used at anytime to put the processor 13, 15 into a known state. Reset is typicallyapplied after powerup when the machine is in an unknown state.

Driving the RS-signal low causes the processor to terminate executionand forces the program counter 93 to zero. RS- affects various registersand status bits. At powerup, the state of the processor 13, 15 isundefined. For correct system operation after powerup, a reset signal isasserted low for five clock cycles to reset the device 11. Processorexecution begins at location 0, which normally contains a B (BRANCH)statement to direct program execution to the system initializationroutine.

Upon receiving an RS- signal, the following actions take place:

1) A logic 0 is loaded into the CNF (configuration control) bit instatus register ST1, mapping all on-chip data RAM into data addressspace.

2) The Program Counter (PC) is set to 0, and the address bus A15-A0 isdriven with all zeros while RS-- is low.

3) All interrupts are disabled by setting the INTM (interrupt mode) bitto 1. (Note that RS- is non-maskable ) . The interrupt flag register(IFR) is cleared. 4) Status bits: ("--" means "loaded into") 0--OV,1--XF, 1--SXM, 0--PM, 1--HM, 0--BRAF, 0--TRM, 0--NDX, 0--CENB1,0--CENB2,Inverse of TxM--MP/MC- and RAM, 0-- OVLY, 0 -- IPTR, and 1--C.

(The remaining status bats remain undefined and should be initializedappropriately).

5) The global memory allocation register (GREG) is cleared to make allmemory local.

6) The RPTC (repeat counter) is cleared.

7) The IACK- (interrupt acknowledge) signal is generated in the samemanner as a maskable interrupt.

8) A synchronized reset signal SRESET- is sent to the peripheralcircuits to initialize them.

Execution starts from location 0 of program memory when the RS- signalis taken high. Note that if RS-- is asserted while in the hold mode,normal reset operation occurs internally, but all buses and controllines remain in the high-impedance state. Upon release of HOLD-- andRS-, execution starts from location zero.

There are four key status and control registers for the processor core.ST0 and ST1 contain the status of various conditions while PMST and CBCRcontain extra status and control information for control of the enhancedfeatures of the processor core. These registers can be stored into datamemory and loaded from data memory, thus allowing the status of themachine to be saved and restored for subroutines. Each of theseregisters has an associated one-deep stack for automatic context saveswhen an interrupt trap is taken. The stack is automatically popped upona return from interrupt.

The PMST and CBCR registers reside in the memory-mapped register 85space in page zero of data memory space. Therefore they can be actedupon directly by the CALU and the PLU. They can be saved the same as anyother data memory location.

ST0 and ST1 are written to using the LST and LST1 instructionsrespectively and read from using the SST and SST1 instructions (with theexception of the INTM bit that is not affected by the LST instruction).

Unlike the PMST and CBCR registers, the ST0 and ST1 registers do notreside in the memory map and therefore are not handled using the PLUinstructions. The individual bits of these registers can be set orcleared using the SETC and CLRC instructions. For example, thesign-extension mode is set with SETC SXM or cleared with CLRC SXM.

Table A-4 defines all the status/control bits.

                  TABLE A-4                                                       ______________________________________                                        Status Register Field Definitions                                             FIELD  FUNCTION                                                               ______________________________________                                        ARB    Auxiliary Register Pointer Buffer. ST1 bits                                   15-13. Whenever the ARP is loaded, the old                                    ARP value is copied to the ARB except during an                               LST instruction. When the ARB is loaded via a                                 LST1 instruction, the same value is also copied                               to the ARP.                                                            ARP    Auxiliary Register Pointer. ST0 bits 15-13.                                   This three-bit field selects the AR to be used                                in indirect addressing. When ARP is loaded, the                               old ARP value is copied to the ARB register.                                  ARP may be modified by memory-reference                                       instructions when using indirect addressing, and                              by the LARP, MAR, and LST instructions. ARP is                                also loaded with the same value as ARB when an                                LST1 instructions is executed.                                         BRAF   Block Repeat Active Flag. PMST bit 0. This                                    bit indicates whether (BRAF = 1) or not (BRAF =                               0) block repeat is currently active. Writing a                                zero to this bit deactivates block repeat. BRAF                               is set to zero upon reset.                                             C      Carry Bit. ST1 bit 9. This bit is set to 1 if                                 the result of an addition generates a carry, or                               reset to 0 if the result of a subtraction                                     generates a borrow. Otherwise, it is reset                                    after an addition or set after a subtraction,                                 except if the instruction is ADD or SUB. ADD                                  can only set and SUBH only reset the carry bit,                               but does not affect it otherwise. The single                                  bit shift and rotate instructions also affect                                 this bit, as well as the SETC, CLRC, LST1                                     instructions. Branch instructions are provided                                to branch on the status of C. C is set to 1 on                                a reset.                                                               CAR1   Circular Buffer 1 Auxiliary Register. CBCR                                    bits 2-0. These three bits identify which                                     auxiliary register is assigned to circular                                    buffer 1.                                                              CAR2   Circular Buffer 2 Auxiliary Register. CBCR                                    bits 6-4. These three bits identify which                                     auxiliary register is assigned to circular                                    buffer 2.                                                              CENB1  Circular Buffer 1 Enable. CBCR bit 3. This bit,                               when set to 1, enables circular buffer 1. When                                set to zero, disables circular buffer 1. Set to                               zero upon reset.                                                       CENB2  Circular Buffer 2 Enable. CBCR bit 7. This bit,                               when set to 1, enables circular buffer 2. When                                set to zero circular buffer 2 is disabled.                                    CBEN2 is set to zero upon reset.                                       CNF    On-chip RAM Configuration Control bit. ST1 bit                                12. If set to 0, the reconfigurable data RAM                                  blocks are mapped to data space; otherwise, they                              are mapped to program space. The CNF may be                                   modified by the CNFD, CNFP, and LST1                                          instructions. RE- resets the CNF to 0.                                 DP     Data Memory Page Pointer. ST0 bits 8-0. The                                   9-bit DP register is concatenated with the 7                                  LSBs of an instruction word to form a direct                                  memory address of 16 bits. DP may be modified                                 by the LST, LDP, and LDPK instructions.                                FO     Format bit. ST1 bit 3. This bit is used to                                    configure the serial port format.                                      FSM    Frame Synchronous Mode bit. ST1 bit 5. This bit                               is used in configuration of the framing mode of                               the serial port.                                                       HM     Hold Mode bit. ST1 bit 6. When HM = 1, the                                    processor halts internal execution when                                       acknowledging an active HOLD-. When HM = 0, the                               processor may continue execution out of internal                              program memory but puts its external interface                                in a high-impedance state. This bit is set to 1                               by reset.                                                              INTM   Interrupt Mode bit. ST0 bit 9. When set to 0,                                 all unmasked interrupts are enabled. When set                                 to 1, all maskable interrupts are disabled.                                   INTM is set and reset by the DINT and                                         EINT instructions. RS- and 1ACK- also set INTM.                               INTM has no effect on the unmaskable RS- and                                  NM1- interrupts. INTM is unaffected by the LST                                instruction.                                                           IPTR   Interrupt vector pointer PMST bits 15-11. These                               five bits point to the 2K page where the                                      interrupt vectors reside. This allows the user                                to remap interrupt vectors to RAM for boot                                    loaded operations. At reset these bits are all                                set to zero. Therefore the reset vector always                                resides at zero in the program memory space.                           MP/MC- MicroProcessor/MicroComputer bit, PMST bit 3.                                 When set to zero the on-chip ROM is enabled.                                  When set to one the on-chip ROM is not                                        addressable. This bit is set to the inverse of                                TXM at reset.                                                          NDX    Enable Extra Index Regiser. PMST bit 2. When                                  set to 0, the ARAU uses ARO for indexing and                                  address compare. When set to 1, the ARAU uses                                 INDX for indexing and ARCR for address compare.                               Upon reset, this bit is set to zero.                                   OV     Overflow Flag bit. ST0 bit 12. As a latched                                   overflow signal, OV is set to 1 when overflow                                 occurs in the ALU. Once an overflow occurs, the                               OV remains set until a reset, BV, BNV, or LST                                 instructions clears OV.                                                OVLY   OVerLAY the on-chip program memory in data                                    memory space. PMST bit 5. If set to zero the                                  memory is addressable in program space only. If                               set to one it is addressable in both program and                              data space. Set to zero at reset.                                      OVM    Overflow Mode bit. ST0 bit 11. When set to 0,                                 overflowed results overflow normally in the                                   accumulator. When set to 1, the accumulator is                                set to either its most positive or negative                                   value upon encountering an overflow. The SOVM                                 and ROVM instructions set and reset this bit,                                 respectively, LST may also be used to modify                                  the OVM.                                                               PM     Product Shift Mode. ST1 bits 1-0. If these two                                bits are 00, the multiplier's 32-bit product or                               buffer is loaded into the ALU with no shift. If                               PM = 01, the PREG or BPR output is left-shifted                               one place and loaded into the ALU, with the LSB                               zero-filled. If PM = 10, the PREG or BPR output                               is left-shifted by four bits and loaded into                                  the ALU, with the LSBs zero-filled. PM = 11                                   produces a right shift of six bits,                                           sign-extended. Note that the PREG pr BPR                                      contents remain unchanged. The shift takes                                    place when transferring the contents of the PREG                              or BPR to the ALU. PM is loaded by the SPM and                                LST1 instructions. The PM bits are cleared by                                 RS-.                                                                   RAM    Enable/Disable on-chip RAM. PMST bit 4. Set to                                inverse of TXM at reset. If set to zero the                                   on-chip program RAM is disabled. If set to one                                the on-chip program RAM is enabled.                                    SXM    Sign-Extension Mode bit. ST1 bit 10. SXM =  1                                 produces sign extension on data as it is passed                               into the accumulator through the scaling                                      shifter. SXM = 0 suppresses sign extension.                                   SXM does not affect the definition of certain                                 instructions; e.g., the ADDS instruction                                      suppresses sign extension regardless of SXM.                                  This bit is set and reset by the SSXM and RSXM                                instructions, and may also be loaded by LST1.                                 SXM is set to 1 by reset.                                              TC     Test/Control Flag bit. ST1 bit 11. The TC bit                                 is affected by the BIT, BITT, CMPR, LST1, NORM,                               CPLK, XPLK, OPLK, APLK, XPL, OPL, and APL                                     instructions. The TC bit is set to a 1 if a bit                               tested by BIT or BITT is a 1, if a compare                                    condition tested by CMPR exists between ARCR and                              another AR pointed to by ARP, if the                                          exclusive-OR function of the two MSBs of the                                  accumulator is true when tested by a NORM                                     instruction, if the long immediate value is                                   equal to the data value on the CPLK instruction,                              or if the result of the logical function (XPLK,                               OPLK, APLK, XPL, OPL or APL) is zero. Fourteen                                conditional branch, call and return instructions                              provide operations based upon the value of TC:                                BBZ, BBZD, BBNZ, BBNZD, CBZ, CBZD, CBNZ,                                      CBNZD, RBZ, RJBZD, RBNZ, RBNZD, CEBZ, and                                     CEBNZ.                                                                 TRM    Enable Multiple TREG's. PMST bit 1. When TRM                                  is set to zero, any write to any of TREG0, TREG1                              or TREG2 writes to all three. When TRM                                        is set to one, TREG0, TREG1, and TREG2 are                                    individually selectable. TRM is set to zero at                                reset.                                                                 TXM    Transmit Mode Bit. ST1 bit 2. This bit is                                     used in configuration of the transmit clock pin                               of the serial port.                                                    XF     XF pin status bit. ST1 bit 4. This bit                                        indicates the current level of the external                                   flag.                                                                  ______________________________________                                    

The repeat counter (RPTC) in registers 85 is a 16-bit counter, whichwhen loaded with a number N, causes the next single instruction to beexecuted N+1 times. The RPTC can be loaded with a number from 0 to 255using the RPTK instruction or a number from 0 to 65535 using the RPT,RPTR, or RPTZ instructions. This results in a maximum of 65536executions of a given instruction. RPTC is cleared by reset. Both theRPTR and the RPTZ instructions load a long immediate value into RPTC andthe RPTZ also clears the PREG and ACC.

The repeat feature can be used with instructions such asmultiply/accumulates (MAC/MACD), block moves (BLKD/BLKP), I/O transfers(IN/OUT), and table read/writes (TBLR/TBLW). These instructions,although normally multi-cycle, are pipelined when using the repeatfeature, and effectively become single-cycle instructions. For example,the table read instruction may take three or more cycles to execute, butwhen repeated, a table location can be read every cycle.

A block repeat feature provides zero overhead looping for implementationof FOR or DO loops. The function is controlled by three registers (PASR,PAER and BRCR) in registers 85 and the BRAF bit in the PMST. The BlockRepeat Counter Register (BRCR) is loaded with a loop count of 0 to65535. Then the RPTB (repeat block) instruction is executed, thusloading the Program Address Start Register (PASR) with the address ofthe instruction following the RPTB instruction and loading the ProgramAddress End Register (PAER) with its long immediate operand. The longimmediate operand is the address of the last instruction in the loop.The BRAF bit is automatically set active by the execution of the RPTBinstruction so the loop starts. With each PC update, the PAER iscompared to the PC. If they are equal the BRCR is decremented. If theBRCR is greater than or equal to zero, the PASR is loaded into the PCthus starting the loop over.

The equivalent to a WHILE loop can be implemented by setting the BRAFbit to zero if the exit condition is met. If this is done, the programcompletes the current pass through the loop but not go back to the top.The bit must be set at least three instructions before the end of theloop to exit the current loop. Block repeat loops can be exited andreturned to without stopping and restarting the loop. Subroutine callsand branches and interrupts do not necessarily affect the loop. Whenprogram control is returned to the loop, the loop execution is resumed.

Loops can be nested by saving the three registers PASR, PAER and BRCRprior to entry of an internal loop and restoring them upon completion ofthe internal loop and resetting of the BRAF bit. Since it takes a totalof 12 cycles to save (6 cycles) and restore (6 cycles) the block repeatregisters, smaller internal loops can be processed with the BANZDlooping method that take two extra cycles per loop (i.e., if the loopcount is less than 6 it may be more efficient to use the BANZDtechnique).

When operating in the powerdown mode, the processor core enters adormant state and dissipates considerably less power than the powernormally dissipated by the device. Powerdown mode is invoked either byexecuting an IDLE instruction or by driving the HOLD- input low whilethe HM status bit is set to one.

While in powerdown mode, all of the internal contents of processor 13,15 are maintained to allow operation to continue unaltered whenpowerdown mode is terminated. Powerdown mode, when initiated by an IDLEinstruction, is terminated upon receipt of an interrupt. When powerdownmode is initiated via the HOLD- signal it is terminated when the HOLD-goes inactive.

The power requirements can be further lowered to the sub-milliamp rangeby slowing down-or even stopping the input clock. RS- is suitablyactivated before stopping the clock and held active until the clock isstabilized when restarting the system. This brings the device back to aknown state. The contents of most registers and all on-chip RAM remainunchanged. The exceptions include the registers modified by a devicereset.

The Peripheral Logic Unit (PLU) 41 of FIG. 1B is used to directly set,clear, toggle or test multiple bits in a control/status register or anydata memory location. The PLU provides a direct logic Operation path todata memory values without affecting the contents of the accumulator orproduct register. It is used to set or clear multiple control bits in aregister or to test multiple bits in a flag register.

The PLU 41 operates by fetching one operand via data bus 111D from datamemory space, fetching the second from either long immediate on theprogram bus 101D or a DBMR (Dynamic Bit Manipulation Register) 223 via aMUX 225. The DBMR is previously loaded from data bus 111D. Then the PLUexecutes its logic operation, defined by the instruction on the twooperands. Finally, the result is written via data bus 111D to the samedata location that the first operand was fetched from.

The PLU allows the direct manipulation of bits in any location in datamemory space. This direct bit-manipulation is done with by ANDing,ORing, XORing or loading a 16-bit long immediate value to a datalocation. For example, to initialize the CBCR (Circular Buffer ControlRegister) to use AR1 for circular buffer 1 and AR2 for circular buffer 2but not enable the circular buffers, execute:

    ______________________________________                                        SPLK 021h, CBCR                                                                             Store Peripheral Long Immediate                                 ______________________________________                                    

To later enable circular buffers 1 and 2 execute:

    ______________________________________                                        OPLK 088h, CBCR                                                                             Set bit 7 and bit 3 in CBCR                                     ______________________________________                                    

Testing for individual bits in a specific register or data word is stilldone via the BIT instruction, however, a data word can be tested againsta particular pattern with the CPLK (Compare Peripheral Long Immediate)instruction. If the data value is equal to the long immediate value,then the TC bit is set to one. If the result of any PLU instruction iszero then the TC bit is set.

The bit set, clear, and toggle functions can also be executed with a16-bit dynamic register DBMR value instead of the long immediate value.This is done with the following three instructions: XPL (XOR DBMRregister to data); OPL (OR DBMR register to data); and APE (AND DBMRRegister to data).

The processor has sixteen external maskable user interrupts (INT16-INT1)available for external devices that interrupt the processor. Internalinterrupts are generated by the serial port (RINT and XINT), by thetimer (TINT), by parity checkers (PNTL and PNTH), and by the softwareinterrupt (TRAP) instruction. Interrupts are prioritized with reset(RS-) having the highest priority and INT15 having the lowest priority.

An interrupt control block 231 feeds program data bus 101D. Vectorlocations and priorities for all internal and external interrupts areshown in Table A-5. The TRAP instruction, used for software interrupts,is not prioritized but is included here since it has its own vectorlocation. Each interrupt address has been spaced apart by two locationsso that branch instructions can be accommodated in those locations.

                                      TABLE A-5                                   __________________________________________________________________________    Interrupt Locations and Priorities                                            LOCATION                                                                      NAME DEC HEX                                                                              PRIORITY                                                                             FUNCTION                                                   __________________________________________________________________________    RS-   0   0  1 (highest)                                                                         EXTERNAL RESET SIGNAL                                      INT1-                                                                               2   2  3     EXTERNAL USER INTERRUPT #1                                 INT2-                                                                               4   4  4     EXTERNAL USER INTERRUPT #2                                 INT3-                                                                               6   6  5     EXTERNAL USER INTERRUPT #3                                 INT4-                                                                               8   8  6     EXTERNAL USER INTERRUPT #4                                 INT5-                                                                              10  A   7     EXTERNAL USER INTERRUPT #5                                 INT6-                                                                              12  C   8     EXTERNAL USER INTERRUPT #6                                 INT7-                                                                              14  E   9     EXTERNAL USER INTERRUPT #7                                 INT8-                                                                              16  10 10     EXTERNAL USER INTERRUPT #8                                 INT9-                                                                              18  12 11     EXTERNAL USER INTERRUPT #9                                 INT10-                                                                             20  14 12     EXTERNAL USER INTERRUPT #10                                INT11-                                                                             22  16 13     EXTERNAL USER INTERRUPT #11                                INT12-                                                                             24  18 14     EXTERNAL USER INTERRUPT #12                                INT13-                                                                             26  1A 15     EXTERNAL USER INTERRUPT #13                                INT14-                                                                             28  1C 16     EXTERNAL USER INTERRUPT #14                                INT15-                                                                             30  IE 17     EXTERNAL USER INTERRUPT #13                                INT16-                                                                             32  20 18     EXTERNAL USER INTERRUPT #14                                TRAP 34  22 N/A    TRAP INSTRUCTION VECTOR                                    NMI  36  24  2     NON-MASKABLE INTERRUPT                                     __________________________________________________________________________

In FIG. 1B, a Bus Interface Module BIM 241 is connected between data bus111D and program data bus 101D. BIM 241 on command permits datatransfers between buses 101D and 111D and increases the architecturalflexibility of the system compared to either the classic Harvardarchitecture or Von Neumann architecture.

Inventive systems including processing arrangements and componentcircuitry made possible by improvements to the processor 13, 15 arediscussed next. For general purpose digital signal processingapplications, these systems advantageously perform convolution,correlation, Hilbert transforms, Fast Fourier Transforms, adaptivefiltering, windowing, and waveform generation. Further applicationsinvolving in some cases the general algorithms just listed are voicemail, speech vocoding, speech recognition, speaker verification, speechenhancement, speech synthesis and text-to-speech systems.

Instrumentation according to the invention provides improved spectrumanalyzers, function generators, pattern matching systems, seismicprocessing systems, transient analysis systems, digital filters andphase lock loops for applications in which the invention is suitablyutilized.

Automotive controls and systems according to the invention suitablyprovide engine control, vibration analysis, anti-skid braking control,adaptive ride control, voice commands, and automotive transmissioncontrol.

In the naval, aviation and military field, inventive systems areprovided and improved according to the invention to provide globalpositioning systems, processor supported navigation systems, radartracking systems, platform stabilizing systems, missile guidancesystems, secure communications systems, radar processing and otherprocessing systems.

Further systems according to the invention include computer disk drivemotor controllers, printers, plotters, optical disk controllers,servomechanical control systems, robot control systems, laser printercontrols and motor controls generally. Some of these control systems areapplicable in the industrial environment as robotics controllers, autoassembly apparatus and inspection equipment, industrial drives, numericcontrollers, computerized power tools, security access systems and powerline monitors.

Telecommunications inventions contemplated according to the teachingsand principles herein disclosed include echo cancellers, ADPCMtranscoders, digital PBXs, line repeaters, channel multiplexers, modems,adaptive equalizers, DTMF encoders and DTMF decoders, data encryptionapparatus, digital radio, cellular telephones, fax machines, loudspeakertelephones, digital speech interpolation (DSI) systems, packet switchingsystems, video conferencing systems and spread-spectrum communicationsystems.

In the graphic imaging area, further inventions based on the principlesand devices and systems disclosed herein include optical characterrecognition apparatus, 3-D rotation apparatus, robot vision systems,image transmission and compression apparatus, pattern recognitionsystems, image enhancement equipment, homomorphic processing systems,workstations and animation systems and digital mapping systems.

Medical inventions further contemplated according to the presentinvention include hearing aids, patient monitoring apparatus, ultrasoundequipment, diagnostic tools, automated prosthetics and fetal monitors,for example. Consumer products according to the invention include highdefinition television systems such as high definition televisionreceivers and transmission equipment used at studios and televisionstations. Further consumer inventions include music synthesizers, solidstate answering machines, radar detectors, power tools and toys andgames.

It is emphasized that the system aspects of the invention contemplatedherein provide advantages of improved system architecture, systemperformance, system reliability and economy.

For example, in FIG. 2, an inventive industrial process and protectivecontrol system 300 according to the invention includes industrialsensors 301 and 303 for sensing physical variables pertinent to aparticular industrial environment. Signals from the sensors 301 and 303are provided to a signal processor device 11 of FIGS. 1A and 1B whichinclude the PLU (parallel logic unit) improvement 41 of FIG. 1B. Aninterface 305 includes register locations A, B, C; D, E, F, G and H anddrivers (not shown). The register locations are connected via thedrivers and respective lines 307 to an industrial process device drivenby a motor 311, relay operated apparatus controlled by relays 313 andvarious valves including a solenoid valve 315.

In the industrial process and protective control environment, variousengineering economic considerations operate at cross purposes. If thespeed or throughput of the industrial process is to be high, heavyburdens are placed on the processing capacity of device 11 to interpretthe significance of relatively rapid changes occurring in real time assensed by sensors 301 and 303. On the other hand, the control functionsrequired to respond to the real-world conditions sensed by sensors 301and 303 must also be accomplished swiftly. Advantageously, the additionof PLU 41 resolves conflicting demands on device 11, with negligibleadditional costs when device 11 is fabricated to a single semiconductorchip. In this way, the industrial processing rate, the swiftness ofprotective control and the precision of control are considerablyenhanced.

In FIG. 3, an inventive automotive vehicle 321 includes a chassis 323 onwhich is mounted wheels and axles, an engine 325, suspension 327, andbrakes 329. An automotive body 331 defines a passenger compartment whichis advantageously provided with suspension relative to chassis 323.

An active suspension 335 augments spring and absorber suspensiontechnique and is controlled via an interface 341 having locations forbits A, B, C, D, E, F, G, H, I, J, K, L, M and N. A parallel computationprocessor 343 utilizes computation units of the type disclosed in FIGS.1A and 1B and includes at least one parallel logic unit 41 connected todata bus 351D and program data bus 361D. Numerous sensors includesensors 371, 373 and 375 which monitor the function of suspension 335,engine operation, and anti-skid braking respectively.

An engine control system 381 is connected to several of the locations ofinterface 341. Also an anti-skid braking control system 383 is connectedto further bits of interface 341. Numerous considerations of automotivereliability, safety, passenger comfort, and economy place heavy demandson prior automotive vehicle systems.

In the invention of FIG. 3, automotive vehicle 321 is improved in any orall of these areas by virtue of the extremely flexible parallelism andcontrol advantages of the invention.

The devices such as device 11 which are utilized in the systems of FIGS.2 and 3 and further systems described herein not only address issues ofincreased device performance, but also solve industrial system problemswhich determine the user's overall system performance and cost.

A preferred embodiment device 11 executes an instruction in 50nanoseconds and further improvements in semiconductor manufacture makepossible even higher instruction rates. The on-chip program memory isRAM based and facilitates boot loading of a program from inexpensiveexternal memory. Other versions are suitably ROM based for further costreduction.

An inventive digitally controlled motor system 400 of FIG. 4 includes adigital controller 401 having a device 11 of FIGS. 1A and 1B. Digitalcontroller 401 supplies an output u(n) to a zero order hold circuit ZOH403. ZOH 403 supplies control output u(t) to a DC servomotor 405 inindustrial machinery, home appliances, military equipment or otherapplication systems environment. Connection of motor 405 to a disk drive406 is shown in FIG. 4.

The operational response of servomotor 405 to the input u(t) isdesignated y(t). A sensor 407 is a transducer for the motor output y(t)and feeds a sampler 409 which in its turn supplies a sampled digitizedoutput y(n) to a subtractor 411. Sampler 409 also signals digitalcontroller 401 via an interrupt line INT-. A reference input r(n) fromhuman or automated supervisory control is externally supplied as afurther input to the subtracter 411. An error difference e(n) is thenfed to the digital controller 401 to close the loop. Device 11 endowscontroller 401 with high loop bandwidth and multiple functionality forprocessing and control of other elements besides servomotors as in FIG.2. Zero-overhead interrupt context switching in device 11 additionallyenhances the bandwidth and provides an attractive alternative to pollingarchitecture.

In FIG. 5, a multi-variable state controller 421 executes advancedalgorithms utilizing the device 11 processor. State controller 421receives a reference input r(n) and supplies an output u(n) to a motor423. Multiple electrical variables (position x1, speed x2, current x3and torque x4) are fed back to the state controller 421. Any one or moreof the four variables x1-x4 (in linear combination for example) aresuitably controlled for various operational purposes. The system canoperate controlled velocity or controlled torque applications, and runstepper motors and reversible motors.

In FIG. 6, a motor 431 has its operation sensed and sampled by a sampler433. A processor 435 including device 11 is interrupt driven by sampler433. Velocity information determined by unit 433 is fed back toprocessor 435 improved as described in connection with FIGS. 1A and 1B.Software in program memory 61 of FIG. 1A is executed as estimationalgorithm process 437. Process 437 provides velocity, position andcurrent information to state controller process 439 of processor 435. Adigital output u(n) is supplied as output from state controller 439 to azero order hold circuit 441 that in turn drives motor 431.

The motor is suitably a brushless DC motor with solid state electronicswitches associated with core, coils and rotor in block 431. The systemsof FIGS. 4-6 accommodate shaft encoders, optical and Hall effect rotorposition sensing and back emf (counter electromotive force) sensing ofposition from windings.

In FIG. 7, robot control system 451 has a motor-driven graspingmechanism 453 at the end of a robot arm 455. Robot arm 455 has astructure with axes of rotation 457.1, 457.2, 457.3 and 457.4 Sensorsand high response accurately controllable motors are located on arm 455at articulation points 459.1, 459.2, 459.3 and 459.4.

Numerous such motors and sensors are desirably provided for accuratepositioning and utilization of robot arm mechanism 455. However, thenumerous sensors and motors place conflicting demands on the system as awhole and on a controller 461. Controller 461 resolves these systemdemands by inclusion of device 11 of FIGS. 1A and 1B andinterrupt-driven architecture of system 451. Controller 461intercommunicates with an I/O interface 463 which providesanalog-to-digital and digital-to-analog conversion as well as bitmanipulation by parallel logic unit 41 for the robot arm 455. Theinterface 463 receives position and pressure responses from thenavigation motors 467 and sensors associated with robot arm 455 andgrasping mechanism 453. Interfacer 463 also supplies control commandsthrough servo amplifiers 465 to the respective motors 467 of robot arm455.

Controller 461 has associated memory 467 with static RAM (SRAM) andprogrammable read only memory (PROM). Slower peripherals 469 areassociated with controller 471 and they are efficiently accommodated bythe page boundary sensitive wait state features of controller 461. Thecontroller 461 is also responsive to higher level commands supplied toit by a system manager CPU 473 which is responsive to safety controlapparatus 475. System manager 473 communicates with controller 461 viaI/O and RS 232 drivers 475.

The digital control systems according to the invention make possibleperformance advantages of precision, speed and economy of control notpreviously available. For another example, disk drives includeinformation storage disks spun at high speed by spindle motor units.Additional controls called actuators align read and write head elementsrelative to the information storage disks.

The preferred embodiment can even provide a single chip solution forbeth actuator control and spindle motor control as well as systemprocessing and diagnostic operations. Sophisticated functions areaccommodated without excessively burdening controller 461. A digitalnotch filter can be implemented in controller 461 to cancel mechanicalresonances. A state estimator can estimate velocity and current. AKalman filter reduces sensor noise. Adaptive control compensates fortemperature variations and mechanical variations. Device 11 alsoprovides on-chip PWM .pulse width modulation outputs for spindle motorspeed control. Analogous functions in tape drives, printers, plottersand optical disk systems are readily accommodated. The inventive digitalcontrols provide higher speed, more precise speed control, and fasterdata access generally in I/O technology at comparable costs, thusadvancing the state of the art.

In missile guidance systems, the enhanced operational capabilities ofthe invention provide more accurate guidance of missile systems, therebyreducing the number of expensive missiles required to achieveoperational objectives. Furthermore, equivalent performance can beattained with fewer processor chips, thus reducing weight and allowingaugmented features and payload enhancements.

In FIG. 8, a satellite telecommunication system according to theinvention has first stations 501 and 503 communicating by a satellitetransmission path having a delay of 250 milliseconds. A far endtelephone 505 and a near end telephone 507 are respectively connected toearth stations 501 and 503 by hybrids 509 and 511. Hybrids 509 and 511are delayed eight milliseconds relative to the respective earth stations501 and 503. Accordingly, echo cancellation is necessary to providesatisfactory telecommunications between far end telephone 505 and nearend telephone 507. Moreover, the capability to service numeroustelephone conversation circuits at once is necessary. This places anextreme processing burden on telecommunications equipment.

In FIG. 9, a preferreed embodiment echo canceller 515 is associated witheach hybrid such as 511 to improve the transmission of thecommunications circuit. Not only does device 11 execute echo cancellingalgorithms at high speed, but it also economically services moresatellite communications circuits per chip.

Another system embodiment is an improved modem. In FIG. 10, a processdiagram of operations in device 11 programmed as a modem transmitterincludes a scrambling step 525 followed by an encoding step 527 whichprovides quadrature digital signals I[nT_(b) ] and Q[nT_(b) ] tointerpolation procedures 529 and 531 respectively. Digital modulatorcomputations 533 and 535 multiply the interpolated quadrature signalswith prestored constants from read only memory (ROM) that providetrigonometric cosine and sine values respectively. The modulated signalsare then summed in a summing step 537. A D/A converter connected todevice 11 converts the modulated signals from digital to analog form ina step 539. Gain control by a factor G1 is then performed in modemtransmission and sent to a DAA.

In FIG. 11, a modem receiver using another device 11 receives analogcommunications signals from the DAA. An analog-to--digital converter A/D521 digitizes the information for a digital signal processor employingdevice 11. High rates or digital conversion place heavy burdens on inputprocessing of prior processors. Advantageously, DSP 11 provideszero-overhead interrupt context switching for extremely efficientservicing of interrupts from digitizing elements such as A/D 521 and atthe same time has powerful digital signal processing coputationalfacility for executing modem algorithms. The output of device 11 issupplied to a universal synchronous asynchronous receiver transmitter(USART) 523 which supplies an output D[nT].

In FIG. 12, a process diagram of modem reception by the system of FIG.11 involves automatic gain control by factor G2 upon reception from theDAA supplying a signal s(t) for analog-to-digital conversion at asampling frequency fs. The digitized signal is s[nTs] and is suppliedfor digital processing involving first and second bandpass filtersimplemented by digital filtering steps BPF1 and BPF2 followed byindividualized automatic gain control. A demodulation algorithm producestwo demodulated signals I'[nTs] and Q'[nTs]. These two signals I' and Q'used for carrier recovery fed back to the demodulation algrithm. Also I'and Q' are supplied to a decision algorithm and operated in response toclock recovery. A decoding process 551 follows the decision algorithm.Decoding 551 is followed by a descrambling algorithm 555 that involvesintensive bit manipulation by PLU 41 to recover the input signal d[nT].

As shown in FIG. 12, the numerous steps of the modem reception algorithmare advantageously accomplished by a single digital signal processordevice 11 by virtue of the intensive numerical computation capabilitiesand the bit manipulation provided by PLU 41.

In FIG. 13, computing apparatus 561 incorporating device 11 cooperateswith a host computer 563 via an interface 565. High capacity outboardmemory 567 is interfaced to computer 561 by interface 569. The computer561 advantageously supports two-way pulse code modulated (PCM)communication via peripheral latches 571 and 573. Latch 571 is coupledto a serial to parallel converter 575 for reception of PCMcommunications from external apparatus 577. Computer 561 communicatesvia latch 573 and a parallel to serial unit 579 to supply a serial PCMdata stream to the external apparatus 577.

In FIG. 14, a video imaging system 601 includes device 11 supported byROM 603 and RAM 605. Data gathering sensors 607.1 through 607.n feedinputs to a converter 609 which then supplies voluminous digital data todevice 11. FIG. 14 highlights ALU 21 accumulator 23, multiplier array53, product register 51 and has an addressing unit including ARAU 123. Acontrol element 615 generally represents decoder PLA 221 and pipelinecontroller 225 of FIG. 1A. On-chip I/O peripherals (not shown)communicate with a bus 617 supplying extraordinarily high quality outputto a video display unit 619. Supervisory input and output I/O 621 isalso provided to device 11.

Owing to the advanced addressing capabilities in device 11, control 615is operable on command for transferring the product from productregister 51 directly to the addressing circuit 123 and bypassing anymemory locations during the transfer. Because of the memory mapping, anypair of the computational core-registers of FIGS. 1A and 1B areadvantageously accessed to accomplish memory-bypass transferstherebetween via data bus 111D, regardless of arrow directions toregisters on those Figures. Because the multiplication capabilities ofdevice 11 are utilized in the addressing function, the circuitryestablishes an array in the electronic memory 605 wherein the array hasentries accessible in the memory with a dimensionality of at leastthree. The video display 619 displays the output resulting frommulti-dimensional array processing by device 11. It is to be understood,of course, that the memory 605 is not in and of itself necessarilymulti-dimensional, but that the addressing is rapidly performed bydevice 11 so that information is accessible on demand as if it weredirectly accessible by variables respectively representing multiplearray dimensions. For example, a three dimensional cubic array havingaddress dimensions A1, A2 and A3 can suitably be addressed according tothe equation N² ×A3+N×A2+A1. In a two dimensional array, simple repeatedaddition according to an index count from register 199 of FIG. 1A issufficient for addressing purposes. However, to accommodate the thirdand higher dimensions, the process is considerably expedited byintroducing the product capabilities of the multiplier 53.

FIGS. 15 and 16 respectively show function-oriented and hardwareblock--oriented diagrams of video processing systems according to theinvention. Applications for these inventive systems provide newworkstations, computer interfaces, television products and highdefinition television (HDTV) products.

In FIG. 15, a host computer 631 provides data input to numericprocessing by device 11. Video pixel processing operations 633 arefollowed by memory control operations 635. CRT control functions 637 forthe video display are coordinated with the numeric processing 639, pixelprocessing 633 and memory control 635. The output from memory control635 operations supplies frame buffer memory 641 and then a shiftregister 643. Frame buffer memory and shift register 641 and 643 aresuitably implemented by a Texas Instruments device TMS 4161. A furthershift register 645 supplies video information from shift register 643 toa color palette 647. Color palette 647 drives a display 649 which iscontrolled-by CRT control 637. The color palette 647 is suitably a TMS34070.

In FIG. 16, the host 631 supplies signals to a first device 11 operatingas a DSP microprocessor 653. DSP 653 is supported by memory 651including PROM, EPROM and SRAM static memory. Control, address and datainformation are supplied by two-way communication paths between DSP 653and a second device 11 operating as a GSP (graphics signal processor)655. GSP 655 drives both color palette 647 and display interface 657.Interface 657 is further driven by color palette 647. Display CRT 659 isdriven by display interface 657. It is to be understood that the devices11 and the system of FIG. 16 in general is operated at an appropriateclock rate suitable to the functions required. Device 11 is fabricatedin micron level and sub-micron embodiments to support processing speedsneeded for particular applications. It is contemplated that the demandsof high definition television apparatus for increased processing powerbe met not only by use of higher clock rates but also by the structuralimprovements of the circuitry disclosed herein.

In FIG. 17, an automatic speech recognition system according to theinvention has a microphone 701, the output of which is sampled by asample-and--hold circuit 703 and then digitally converted by A/D circuit705. An interrupt-driven fast Fourier transform processor 707 utilizesdevice 11 and converts the sampled time domain input from microphone 701into a digital output representative of a frequency spectrum of thesound. This processor 707 is very efficient partly due to thezero-overhead interrupt context switching feature, conditionalinstructions and auxiliary address registers mapped into memory addressspace as discussed earlier.

Processor 707 provides each spectrum to a speech recognition DSP 709incorporating a further device 11. Recognition DSP 709 executes anyappropriately now known or later developed speech recognition algorithm.For example, in a template matching algorithm, numerous computationsinvolving multiplications, additions and maximum or minimumdeterminations are executed- The device 11 is ideally suited to rapidexecution of such algorithms by virtue of its series maximum/minimumfunction architecture. Recognition DSP 709 supplies an output to asystem bus 711. ROM 713 and RAM 715 support the system efficientlybecause of the software wait states on page boundaries provided byrecognition DSP 709. Output from a speech synthesizer 717 that isresponsive to speech recognition DSP 709 is-supplied to a loudspeaker orother appropriate transducer 719.

System I/O 721 downloads to document production devices 723 such asprinters, tapes, hard disks and the like. A video cathode ray tube (CRT)display 725 is fed from bus 711 as described in connection with FIGS. 15and 16. A keyboard 727 provides occasional human supervisory input tobus 711. In industrial and other process control applications of speechrecognition, a control interface 729 with a further device 11 isconnected to bus 711 and in turn supplies outputs for motors, valves andother servomechanical elements 731 in accordance with bit manipulationand the principles and description of FIGS. 2, 3, 4, 5, 6 and 7hereinabove.

In speech recognition-based digital filter hearing aids, transformedspeech from recognition DSP 709 is converted from digital to analog formby a D/A converter 735 and output through a loudspeaker 737. The samechain of blocks 701, 703, 705, 707, 709, 735, 737 is also applicable intelecommunications for speech recognition-based equalization, filteringand bandwidth compression.

In advanced speech processing systems, a lexical access processor 739performs symbolic manipulations on phonetic element representationsderived from the output of speech recognition DSP 709 and formulatessyllables, words and sentences according to any suitable lexical accessalgorithm.

A top-down processor 741 performs a top-down processing algorithm basedon the principle that a resolution of ambiguities in speech transcendsthe information contained in the acoustic input in some cases.Accordingly, non-acoustic sensors, such as an optical sensor 743 and apressure sensor 745 are fed to an input system 747 which theninterrupt-drives pattern recognition processor 749. Processor 749directly feeds system bus 711 and also accesses top-down processor 741for enhanced speech recognition, pattern recognition, and artificialintelligence applications.

Device 11 substantially enhances the capabilities of processing at everylevel of the speech recognition apparatus of FIG. 17, e.g., blocks 707,709, 717, 721, 725, 729, 739, 741, 747 and 749.

FIG. 18 shows a vocoder-modem system with encryption for securecommunications. A telephone 771 communicates in secure mode over atelephone line 773. A DSP microcomputer 773 is connected to telephone771 for providing serial data to a block 775. Block 775 performsdigitizing vocoder functions in a section 777, and encryption processingin block 781. Modem algorithm processing in blocks 779 and 783 isdescribed hereinabove in connection with FIGS. 10 and 12. Block 783supplies and receives serial data to and from A/D, D/A unit 785. Unit785 provides analog communication to DAA 787. The substantially enhancedprocessing features of device 11 of FIGS. 1A and 1B make possible areduction in the number of chips required in block 775 so a costreduction is made possible in apparatus according to FIG. 18. In someembodiments, more advanced encryption procedures are readily executed bythe remarkable processing power of device 11. Accordingly, in FIG. 18,device 11 is used either to enhance the functionality of each of thefunctional blocks or to provide comparable functionality with fewerchips and thus less overall product cost.

Three Texas Instruments DSPs are described in the TMS 320C1x User'sGuide and TMS 320C2x User's Guide and Third Generation TMS 320 User'sGuide, all of which are incorporated herein by reference. Also,coassigned U.S. Pat. Nos. 4,577,282 and 4,713,748 are incorporatedherein by reference.

FIG. 19 illustrates the operations of the parallel logic unit 41 of FIG.1B. The parallel logic unit (PLU) allows the CPU to execute logicaloperations directly on values stored in memory without affecting any ofthe registers such as the accumulator in the computation unit 15. Thelogical operations include setting, clearing or toggling any number ofbits in a single instruction. In the preferred embodiment, the PLUaccomplishes a read-modify-write instruction in two instruction cycles.Specifically, PLU 41 accesses a location in RAM 25 either on-chip oroff-chip, performs a bit manipulation operation on it, and then returnsthe result to the location in RAM from which the data was obtained. Inall of these operations, the accumulator is not affected. The productregister is not affected. The accumulator buffer and product registerbuffers ACCB and BPR are not affected. Accordingly, time consumingoperations which would substantially slow down the computation unit 15are avoided by the provision of this important parallel logic unit PLU41. Structurally, the PLU is straight-through logic from its inputs toits outputs which is controlled by decoder PLA 221, enabling anddisabling particular gates inside the logic of the PLU 41 in order toaccomplish the instructions which are shown below.

    ______________________________________                                        APL,K  and the DBMR or a constant with data memory value                      CPL,K  Compare DBMR or constant with data memory value                        OPL,K  or DBMR or a constant with data memory value                           SPLK,K store long immediate to data memory location                           XPL,K  XOR DBMR or a constant with data memory value                          ______________________________________                                    

Bit manipulation includes operations of: 1) set a bit; 2) clear a bit;3) toggle a bit; and 4) test a bit and branch accordingly. The PLU alsosupports these bit manipulation operations without affecting thecontents of any of the CPU registers or status bits. The PLU alsoexecutes logic operations on data memory locations with long immediatevalues.

In FIG. 19, Part A shows a memory location having an arbitrary number ofbits X. In Part B, the SPLK instruction allows any number of bits in amemory word to be written into any memory location. In Part C, the OPLinstruction allows any number of bits in a memory word to be set to onewithout affecting the other bits in the word. In Part D, the APLinstruction allows any number of bits in a memory word to be cleared orset to zero, without affecting the other bits in the word. In Part E,the XPL instruction allows any number of bits in a memory word to betoggled without affecting the other bits in the word. In Part F, the CPLinstruction compares a given word (e.g., 16 bits) against the contentsof an addressed memory location without modifying the addressed memorylocation. The compare function can also be regarded as a non-destructiveexclusive OR (XOR) for a compare on a particular memory location. If thecomparison indicates that the given word is equal to the addressedmemory word, then a TC bit is set to one. The TC bit is bit 11 of theST1 register in the registers 85 of FIG. 1B. A test of an individual bitis performed by the BIT and BITT instructions.

Structurally, the presence of PLU instructions means that decoder PLA221 of FIG. 1A and the logic of PLU 41 include specific circuitry. Whenthe various PLU instructions are loaded into the instruction register(IR), they are decoded by decoder PLA 221 into signals to enable anddisable gates in the logic of PLU 41 so that the operations which theinstructions direct are actually executed.

To support the dynamic placement of bit patterns, the instructionsexecute basic bit operations on a memory word with reference to theregister value in the dynamic bit manipulation register DBMR 223 insteadof using a long immediate value. The DBMR is memory mapped, meaningstructurally that there is decoding circuitry 121 (FIG. 1B) which allowsaddressing of the DBMR 223 from data address bus 111A. A suffix K isappended to the instruction (e.g. APLK) to indicate that the instructionoperates on a long immediate instead of DBPER. Absence of the suffix(e.g. APL) indicates that the instruction operates on the DBMR.Selection of the DBMR is accomplished by MUX 225 of FIG. 1B which hasits select input controlled from decoder PLA 221 with pipeline timingcontrolled by pipeline controller 225.

A long immediate is a value coming from the program data bus as part ofan instruction. "Immediate" signifies that the value is coming in fromthe program data bus. "Long immediate" means that a full word-wide valueis being supplied.

A long immediate often is obtained from read-only memory (ROM) and thusis not alterable. However, when it is desired to have the logicaloperation be alterable in an instruction sequence, the dynamic bitmanipulation bit register is provided for that purpose.

PLU 41 allows parallel bit manipulation on any location in data memoryspace. This permits very high efficiency bit manipulation whichaccommodates the intensive bit manipulation requirements of the controlfield. Bit manipulation of the invention is readily applicable toautomotive control such as engine control, suspension control, anti-skidbraking, and process control, among other applications. Bitmanipulations can switch on and off at relay by setting a bit on or off,turn on an engine, speed up an engine, close solenoids and intensify asignal by stepping a gain stage to a motor in servo control. Complicatedarithmetic operations which are needed for advanced microcontrolapplications execute on device 11 without competition by bitmanipulation operations.

Further applications of bit manipulation include scrambling in modems.If certain bit patterns fail to supply frequency or phase changes oftenenough in the modem, it is difficult or impossible to maintain a carrierin phase clock loops and modem receivers. The bit patterns are scrambledto force the bits to change frequently enough. In this way, the baudclock and carrier phase lock loop in the modem are configured so thatthere is adequate but not excessive energy in each of the digitalfilters. Scrambling involves XORing operations to a serial bit stream.The PLU 41 does this operation extremely efficiently. Since the otherCPU registers of device 11 are not involved in the PLU operations, theseregisters need not be saved when the PLU is going to execute itsinstructions. In the case of the scrambling operation, the bits that areXORed into data patterns are a function of other bits so it takes morethan one operation to actually execute the XORs that are required in anygiven baud period. With the parallel logic unit, these operations can beperformed concurrently with computational operations without having touse the register resources.

As thus described, the PLU together with instruction decoder 221 act asan example of a logic circuit, connected to the program bus forreceiving instructions and connected to the data bus, for executinglogic operations in accordance with at least some of the instructions.The logic operations affect at least one of the data memory locationsindependently of the electronic computation unit without affecting theaccumulator. In some of the instructions, the logic operations includean operation of setting, clearing or toggling particular bits to one ina data word at a selected data memory location without affecting otherbits in the data word at the selected data memory location.

With the DBMR 223, a further logic circuit improvement is provided sothat PLU 41 has a first input connected for receiving data from the databus, an output for sending data to the data bus and a second inputselectively operable to receive a word either from the data bus orprogram bus. The multiplexer 225 acts as a selectively operable element.For example, the contents of any addressable register or memory locationcan be stored to the DBMR. When MUX 275 selects the DBMR, then the PLUsends to data bus 111D the contents of a word from data bus 111Dmodified by a logical operation based on the DBMR such as setting,clearing or toggling. When MUX 225 selects program data bus 101D, a longimmediate constant is selected, on which to base the logical operation.

Turning now to the subject of interrupt management and contextswitching, FIG. 20 illustrates a system including DSP device 11 havingfour interfaces 801, 803, 805 and 807. An analog signal from a sensor ortransducer is converted by A/D converter 809 into digital form andsupplied to DSP 11 through interface 801. When each conversion iscomplete an interrupt signal INT1- is supplied from analog to digitalconverter 809 to DSP 11. DSP 11 is supported by internal SRAM 811, byROM and EPROM 813 and by external memory 815 through interface 803. Theoutput of DSP 11 is supplied to a digital-to-analog converter 817 foroutput and control purposes via interface 807. An optional host computer819 is connected to an interrupt input INT2- of DSP 11 and communicatesdata via interface 805. Other interrupt-based systems herein are shownin FIGS. 4, 6, 11, 14 and 17.

Operations of device 11 on interrupt or other context change are nowdiscussed. Referring to FIGS. 1A and 1B, it is noted that several of theregisters are drawn with a background rectangle. These registers areTREG2 195, TREG1 81, TREG0 49 , BPR 185, PREG 51, ACC 23, ACCB 31, INDX143, ARCR 159, ST0, ST1, and PMST. These registers have registers hereincalled counterpart registers associated with them. Any time an interruptor other context change occurs, then all of the aforementioned registersare automatically pushed onto a one-deep stack. When there is a returnfrom interrupt or a return from the context change, the same registersare automatically restored by popping the one-deep stack.

Advantageously, the interrupt service routines are handled with zerotime overhead on the context save or context switching. The registerssaved in this way are termed "strategic registers". These are theregisters that would be used in an interrupt service routine and inpreference to using any different register in their place.

If a context save to memory were executed register-by-register toprotect the numerous strategic registers, many instruction cycles wouldbe consumed. Furtherefore, the relative frequency at which these contextsave operations occurs depends on the application. In some applicationswith 100 KHz sampling rates in FIG. 20, the frequency of interrupts isvery high and thus the cycles of interrupt context save overhead could,without the zero-overhead improvement be substantial. By providing thezero-overhead context switching feature of the preferred embodiment, theinterrupt service routine cycle count can be reduced to less than halfwhile obtaining the same functionality. It is advantageous to execute onthe order of 100,000 samples per second in multiple channel applicationsof a DSP or to process a single channel with a very high samplingfrequency such as 50 KHz or more. The remarks just made are alsoapplicable to subroutine calls, function calls and other contextswitches.

When an interrupt occurs, status registers are automatically pushed ontothe one-deep stack. In support of this feature, there is an additionalinstruction, return from interrupt (RETI), that automatically pops thestacks to restore the main routine status. The preferred embodiment alsohas an additional return instruction (RETE) that automatically sets aglobal interrupt enable bit, thus enabling interrupts while popping thestatus stack. An instruction designated as delayed return with enable(RETED) protects the three instructions following the return fromthemselves being interrupted.

The preferred embodiment has an interrupt flag register (IFR) mappedinto the memory space. The user can read the IFR by software polling todetermine active interrupts and can clear interrupts by writing to theIFR.

Some applications are next noted in which the zero-overhead contextswitching feature is believed to be particularly advantageous. Improveddisk drives are thus made to be faster and accommodate higherinformation density with greater acceleration and deceleration andfaster read alignment adjustment. The processor can service morefeedback points in robotics. In modems, a lower bit error rate due tosoftware polling of interrupts is made possible. Vocoders in theirencoding are made to have higher accuracy and less bit error. Missileguidance systems have more accurate control and require fewerprocessors. Digital cellular phones are similarly improved.

The zero-overhead context save feature saves all strategic CPU registerswhen an interrupt is taken and restores the- upon return from theservice routine without taking any machine cycle overhead. This freesthe interrupt service routine to use all of the CPU resources withoutaffecting the interrupted code.

FIG. 21 shows a block diagram of device 11 in which the subject matterof FIGS. 1A and 1B is shown as the CPU block 13, 15 in FIG. 21. A set ofregisters are shown broken out of the CPU block and these are thestrategic registers which have a one-deep stack as describedhereinabove.

FIG. 21 is useful in discussing the overall system architecture of thesemiconductor chip. A set of interrupt trap and vector locations 821reside in program memory space. When an interrupt routine in programmemory 61 of FIGS. 1A and 21 is to be executed, the interrupt controllogic 231 of FIG. 21 causes the program counter 93 of FIG. 1A to beloaded with appropriate vector in the interrupt locations 821 to branchto the appropriate interrupt service routine. Two core registers IFR andIMR are an interrupt flag register and interrupt mask registerrespectively. The interrupt flag register gives an indication of whichspecific interrupts are active. The interrupt mask register is a set ofbits by which interrupts to the CPU can be disabled by masking them. Forexample, if there is an active interrupt among the interrupts INT2-,INT1-, and INT0-, then there will be a corresponding bit in the IFR thatis set for a "1". The flag is cleared by taking an interrupt trap bywhich it will automatically be cleared. Otherwise, the interrupt iscleared by ORing a one into the respective interrupt flag register thatclears the interrupt. All active interrupt flags can be cleared at oncealso.

The program and data buses 101 and 111 are diagrammatically combined inFIG. 21 and terminate in peripheral ports 831 and 833. Peripheral port833 provides a parallel interface. Port 831 provides an interface to theTI bus and serial ports for device 11.

FIGS. 22, 23 and 24 illustrate three alternative circuits foraccomplishing zero-overhead interrupt context switching. It should beunderstood all the strategic registers are context-switched in parallelsimultaneously, and therefore the representation of all the registers bysingle flip flops is a diagrammatic technique.

In FIGS. 22 and 23, the upper register and lower register represent theforeground and background rectangles of each of the strategic registersof FIGS. 1A and 1B. FIG. 24 shows the parallelism explicitly.

In FIG. 22, a main register 851 has its data D input selectivelysupplied by a MUX 853. MUX 853 selectively connects the D input ofregister 851 to either parallel data lines A or parallel data lines B.Lines B are connected to the Q output of a counterpart register 855.Main register 851 has a set of Q output lines that are respectivelyconnected to corresponding D inputs of the counterpart register 855.

In an interpretive example, the arrow marked input for line A representsthe results of computations by ALU 21, and accumulator 23 includesregisters 851 and 855. The output of main register 851 of FIG. 22interpreted as accumulator 23 is supplied, for example, to post scaler181 of FIG. 1A. It should be understood, however, that the register 851is replicated as many times as required to correspond to each of thestrategic registers for which double rectangles are indicated in FIGS.1A and 1B.

In FIG. 22, each of the registers 851 and 855 has an output enable (OE)terminal. An OR gate 857 supplies a clock input of main register 851. ORgate 857 has inputs for CPU WRITE and RETE. RETE also feeds a selectinput of MUX 853 and also the OE output enable terminal of counterpartregister 855. Main register 851 has its OE terminal connected to theoutput of an OR gate 859, the inputs of which are connected to interruptacknowledge IACK and CPU READ. IACK also clocks counterpart register 855and all other counterpart registers as indicated by ellipsis.

In operation, in the absence of a return from interrupt (RETE low), MUX853 selects input line A for main register 851. Upon occurrence of CPUWRITE, main register 851 clocks the input from the CPU core into its Dinput. The CPU accesses the contents of register 851 when a CPU READoccurs at OR gate 859 and activates OE.

When an interrupt occurs and is acknowledged (IACK) by device 11, theoutput Q of register 851 is enabled and the counterpart register 855 isclocked, thereby storing the Q output of main register 851 into register855. As the interrupt service routine is executed, input lines Acontinue to be clocked by CPU WRITE into main register 851. When theinterrupt is completed, RETE goes low, switching MUX 853 to select linesB and activating line OE of counterpart register 855. RETE also clocksregister 851 through OR gate 857 to complete the transfer and restorethe main routine information to main register 851. Then upon completionof the return from interrupt RETE goes low reconnecting main register851 to input lines A via MUX 853. In this way, the context switching iscompleted with zero overhead.

FIG. 22 thus illustrates first and second registers connected to anelectronic processor. The registers participate in one processingcontext (e.g. interrupt or subroutine) while retaining information fromanother processing context until a return thereto. MUX 853 and the gates857 and 859 provide an example of a context switching circuit connectedto the first and second registers operative to selectively control inputand output operations of the registers to and from the electronicprocessor, depending on the processing context. The electronic processorsuch as the CPU 13, 15 core of FIGS. 1A and 1B is responsive to acontext signal such as interrupt INT- and operable in the alternativeprocessing context identified by the context signal.

FIG. 23 illustrates a bank switching approach to zero overhead contextswitching. A main register 861 and a counterpart register 863 have theirD inputs connected to a demultiplexer DMUX 865. The Q outputs ofregisters 861 and 863 are connected to respective inputs of a MUX 867.Input from the CPU core is connected to the DMUX 865. Output back to theCPU core is provided from MUX 867. Both select lines from MUXes 865 and867 are connected to a line which goes active when an interrupt serviceroutine ISR is in progress.

In this way, in a main routine, only register 861 is operative. Duringthe interrupt service routine, register 863 is operated while register861 holds contents to which operations are to return. A pair of ANDgates 871 and 873 also act to activate and deactivate registers 861 and863. A CPU WRITE qualifies an input of each AND gate 871 and 873. Theoutputs of AND gates 871 and 873 are connected to the clock inputs ofregisters 863 and 861 respectively. In a main routine with ISR low,register 873 is qualified and CPU WRITE clocks register 861. AND gate871 is disabled in the main routine. When ISR is high during interrupt,CPU WRITE clocks register 863 via qualified AND gate 871, and AND gate873 is disabled.

In FIG. 24, two registers 881 and 883 both have D inputs connected toreceive information simultaneously from the processor (e.g. ALU 21). Theregisters are explicitly replicated in the diagram to illustrate theparallelism of this context switching construction so that, for example,ALU 21 feeds both D inputs of the registers 881 and 883, whereinregisters 881 and 883 illustratively act as accumulator ACC 23.Correspondingly, multiplier 53, for example, feeds the P register 51including registers 891 and 893. (Register 893 is not to be confusedwith BPR 185 of FIG. 1A).

A MUX 895 has its inputs connected respectively to the Q outputs ofregisters 881 and 883. A MUX 897 has its inputs connected respectivelyto the Q outputs of registers 891 and 893. The clock inputs of registers881 and 891 are connected in parallel to an A output of an electronicreversing switch 901. The clock inputs of register 883 and 893 areconnected in parallel to a B output of reversing switch 901. Interrupthardware 903 responds to interrupt acknowledge IACK to produce a lowactive ISR- output when the interrupt service routine is in progress.Interrupt hardware 903 drives the toggle T input of a flip flop 905. A Qoutput of flip flop 905 is connected both to a select input of switch901 and to the select input of both MUXes 895 and 897 as well as MUXesfor all of the strategic regisers.

A CPU WRITE line is connected to an X input of switch 901 and to aninput of an AND gate 907. The low active ISR- output of interrupthardware 903 is connected to a second input of AND gate 907 the outputof which is connected to a Y input of switch 901.

In operation, a reset high initializes the set input of flip flop 905pulling the Q output high and causing MUX 895 to select register 881.Also, switch 901 is thereby caused to connect X to A and Y to B. In amain routine, ISR- is inactive high qualifying AND gate 907.Accordingly, activity on the CPU WRITE line clocks all registers 881,883, 891 and 893 in a main routine. This means that information from ALU21 is clocked into both registers 881 and 883 at once and thatinformation from multiplier 53 is clocked into both registers 891 and893 at once, for example.

Then, upon a context change of which the interrupt service routine is anexample, ISR- goes low and disables AND gate 907. Subsequent CPU WRITEactivity continues to clock registers 881 and 891 for purposes of theinterrupt routine, but fails to clock registers 883 and 893, thusstoring the contents of the main routine in these two latter registersby inaction. Therefore, a context switch occurs with no time overheadwhatever. Upon a return to the original context, such as the mainroutine, ISR- once again goes high enabling AND gate 907. The low tohigh transition toggles flip flop 905 causing MUXes 895 and 897 tochange state and automatically select registers 883 and 893. This againaccomplishes an automatic zero-overhead context switch. Since flip flop905 is toggled, switch 901 changes state to connect X to B and Y to A.Then activity on CPU write clocks both flip flops at once and registers883 and 893 are active registers. A further interrupt (ISR- low)disables registers 881 and 891 while registers 883 and 893 remainactive. Thus, in FIG. 24 there is no main register or counterpartregister, but instead the pairs of registers share these functionsalternately.

In this way, FIG. 24 provides a switching circuit connecting thearithmetic logic circuit to both of two registers until an occurrence ofthe interrupt signal. The switching circuit temporarily disables one ofthe registers from storing further information from the arithmetic logicunit in response to the interrupt signal. Put another way, this contextswitching circuit like that of FIGS. 22 and 23 is operable toselectively clock first and second registers. Unlike the circuits ofFIGS. 22 and 23, the circuit of FIG. 24 has first and second registers,both having inputs connected to receive information simultaneously fromthe processor. The processor has a program counter as already discussedand is connected to these registers for executing a first routine and asecond routine involving a program counter discontinuity.

In FIGS. 22-24, a stack is, in effect, associated with a set ofregisters and the processor is operative upon a task change to thesecond routine for pushing the contents of the plurality of registersonto the stack. Similarly, upon return from interrupt, the processorpops the stack to allow substantially immediate resumption of the firstroutine. The second routine can be an interrupt service routine, asoftware trap, a subroutine, a procedure, a function or any othercontext changing routine.

In FIG. 25, a method of operating the circuit of FIG. 24 initializes theQ output of flip flop 905 in a step 911. Operations proceed in a step913 to operate the output MUXes 895 and 897 based on the state of the Qoutput of flip flop 905. Then a decision step 915 determines whether thecontext is to be switched in response to the ISR- signal, for example.If not, operations in a step 917 clock all registers 881, 883, 891 and893 and loop back to step 913 whence operations continue indefinitelyuntil in step 915 a context switch does occur. In such case, a branchgoes from step 915 to a step 919 to clock only the registers selected bythe MUXes (e.g. 895 and 897). When return occurs, Q is toggled at flipflop 905 whence operations loop back to step 913 and continueindefinitely as described.

In FIG. 26, device 11 is connected to an external ROM 951 and externalRAM 953, as well as an I/O peripheral 955 which communicates to device11 at a ready RDY- input. Each of the peripheral devices 951, 953 and955 are connected by a peripheral data bus 957 to the data pins ofdevice 11. The memories 951 and 953 are both connected to a peripheraladdress bus 959 from device 11. Enables are provided by lines designatedIS-, PS- and DS- from device 11. A WRITE enable line WE- is connectedfrom device 11 to RAM 953 to support write operations.

As a practical matter, the processor in device 11 can run much fasterthan the peripherals and especially many low-cost memories that arepresently available. Device 11 may be faster than any memories presentlyavailable on the market so when external memory is provided, wait statesneed to be inserted to give the memories and other peripherals time torespond to the processor. Software wait states can be added so that thedevice 11 automatically adds a software programmable number of waitstates automatically. However, the different peripherals need fewer orlarger numbers of wait states and to provide the same number of waitstates for all peripherals is inefficient of processor time.

This problem is solved in the preferred embodiment of FIGS. 26 and 27 byproviding software controlled wait state defined on memory page addressranges or boundaries and adaptively optimized for available memories andperipheral interfaces. This important configuration eliminates any needfor high speed external glue logic to decode addresses and generatehardware wait states.

In contrast with the glue logic and hardware wait state approach, theprogrammable page boundary oriented solution described herein requiresno external glue logic which would otherwise need to operate very fastand thus require fastest, highest power and most expensive logic toimplement the glue function. Elimination of glue logic also savesprinted circuit board real estate. Furthermore, the processor can thenbe operated faster than any available glue logic.

The preferred embodiment thus combines with a concept of software waitstates, the mapping of the software wait states on memory pages. Thememory pages are defined as the most common memory block size used inthe particular processor applications, for example. The number of waitstates used for a specific block of memory is defined in a programmableregister and can be redefined. The wait state generator generates theappropriate number of wait states as defined in the programmableregister any time an address is generated in the respective addressrange or page or blocks. The mapping to specific bank sizes or pagesizes eliminates any need for external address decoded glue logic foraccelerating external cycles. External peripheral interfaces are decodedon individual address locations and the software wait state generatornot only controls the number of wait states required for each individualperipheral, but is also compatible with ready line control for extendingthe number of wait states beyond the programmed amount.

A programmable wait state circuit of FIG. 27 causes external accesses tooperate illustratively with 0 to 15 wait states extendable by thecondition of a ready line RDY-. Wait states are additional machinecycles added to a memory access to give additional access time forslower external memories or peripherals. If at the completion of theprogrammed number of wait states the ready line is low, additional waitstates are added as controlled by the ready line. The wait state circuitof FIG. 27 includes a 4-bit down register block 971 connected to a WAIT-input of the processor in device 11 of FIG. 21 by an OR gate 974. Gate974 has low-active inputs as well as output. The ready line RDY- isconnected to an input of OR- gate 974. A set of registers 975 hasillustratively sixteen locations of four bits each. Each of the four bitnibbles defines a number of wait states from 0 to 15 on Q output linesto wait state generator 971. When device 11 asserts an address to one ofthe peripherals 951, 953 or 955 on a peripheral address bus 959, anon-chip decoder 977 decodes the most significant bits MSB representingthe page of memory which is being addressed. For example, in the systemof FIG. 26 there are 16 pages of memory. Decoder 977 selects one of the16 four bit nibbles in the registers 975 and outputs the selected nibbleto wait state generator 971. Generator 971 correspondingly counts downto zero and thereby produces the wait states defined by the nibble. Theregisters 975 are loaded via data bus 111D initially in setting up thesystem based on the characteristics of the peripherals. Thus in thepreliminary phase, the data address bus 111A asserts an address todecoder 977 and a select line SEL is activated. Decoder 977 responds tothe address on bus 111A to select one of the registers 975 into which iswritten the programmed number of wait states via data bus 111D. Thus,the number of wait states defined for a specific address segment or pageis defined by the wait state control registers PWSR0, PWSR1, DWSR0,DWSR1, IWSR0, IWSR1, IWSR2 and IWSR3. Decoder 977 is itself suitablyfurther made programmable by data buses 111A and 111D by providing oneor more registers to define programmable widths of address ranges towhich the decoder 977 is to be responsive.

More specifically, with reference to the software wait state generator,the program space is illustratively broken into 8K word segments. Foreach 8K word segment is programed a corresponding four bit value in oneof the PWSR registers to define 0 to 15 wait states. The data space isalso mapped on 8K word boundaries to the two DWSR registers.

The wait state control registers 975 are mapped in the address space.On-chip memory and memory mapped registers in the CPU core 13, 15 arenot affected by the software wait state generators. On-chip memoryaccesses operate at full speed. Each wait state adds a single machinecycle.

The PWSR registers are provided for program memory wait states. The DWSRregisters are provided for data memory wait states. The IWSR registersare provided for I/O peripheral wait states.

Since the wait states are software programmable, the processor can adaptto the peripherals with which it is used. Thus, the wait state values inregisters 975 can be set to the maximum upon startup and then the amountof time that is required to receive a ready signal via line 978 isprocessed by software in order to speed up the processor to the maximumthat the peripherals can support. Some of the I/O may beanalog-to-digital converters. Memories typically come in blocks of 8K.Each of the peripherals has its own speed and the preferred embodimentthus adaptively provides its own desirable set of wait states. Largersize memories can be accommodated by simply putting the same wait statevalue in more than one nibble of the registers 975. For example, device11 can interact with one block of memory which can be a low speed EPROMthat is 8K wide which is used together with a high speed block of RAMthat is also 8K. As soon as the CPU addresses the EPROM, it provides agreater number of wait states. As soon as the CPU addresses the highspeed RAM, it uses a lesser amount of wait states. In this way, nodecode logic or ready logic off-chip is needed to either slow down orspeed up the device appropriately for different memories. In this way,the preferred embodiment affords a complete control when used with auser's configuration of a off-chip memory or other peripheral chips.

Upon system reset, in some embodiments it is advisable to set theregisters with a maximum value of 15 wait states so that the device 11runs relatively slowly initially and then have software speed it up tothe appropriate level rather than having device 11 run very fastinitially which means that it will be unable to communicate effectivelywith the peripherals in the initial phase of its operations.

In this way, device 11 is readily usable with peripheral devices havingdiffering communication response periods. CPU core 13, 15 acts as adigital processor adapted for selecting different ones of the peripheraldevices by asserting addresses of each selected peripheral device.Registers 975 are an example of addressable programmable registers forholding wait state values representative of distinct numbers of waitstates corresponding to different address ranges. Decoder 977 and waitstate generator 973 act as circuitry responsive to an asserted addressto the peripheral devices asserted by the digital processor forgenerating the number of wait states represented by the value held inone of the addressable programmable registers corresponding to one ofthe address ranges in which the asserted address occurs. In this way,the differing communication response periods of the peripheral devicesare accommodated.

Decoder 977 responds to the CPU core for individually selecting andloading the wait state generator with respective values representing thenumber of wait states to be generated. In other embodiments, individualprogrammable counters for the pages are employed.

FIG. 28 is a process diagram for describing the operation of twoinstructions CRGT and CRLT. These two instructions involve a high speedgreater-than and less-than computation which readily computes maximumsand minimums when used repeatedly. Operations commence with a start 981and proceed to determine whether the CRGT or CRLT instruction ispresent. When this is the case, operations go on to a step 985 to storethe ALU 21 to accumulator 23 in FIG. 1A. Then in a step 987, the ALUselects the contents of ACCB 31 via MUX 77 of FIG. 1A. In a step 989,the ALU is coactively operated to compare the contents of accumulator 23to ACCB 31, by subtraction to obtain the sign of the arithmeticdifference, for instance. In step 991, the greater or lesser valuedepending on the instruction CRGT or CRLT respectively is supplied toACCB 31 by either storing ACC 23 to ACCB 31 or omitting to do so,depending on the state of the comparison. For example, if ACC 23 has agreater value then ACCB 31 and the instruction is CRGT, then the ACC isstored to ACCB, otherwise not. If ACC 23 has a lesser value then ACCBand the instruction is CRLT, then the ACC is stored to ACCB. In someembodiments, when ACCB already holds the desired value, a transferwrites ACCB into ACC. Subsequently, a test 993 determines whether aseries of values is complete. If not, then operations loop back to step983. If the series is complete in step 993, operations branch to a step995 to store the maximum or minimum value of the series which has beenthus computed.

The capacity to speedily compute the maximum of a series of numbers isparticularly beneficial in an automatic gain control system in which amultiplier or gain factor is based on a maximum value in order to raiseor lower the gain of an input signal so that it can be more effectivelyprocessed. Such automatic gain control is used in radio receivers, audioamplifiers, modems and also in control systems utilizing algorithms suchas the PID algorithm. PID is a proportional integral and differentialfeedback control system. Still another application is in patternrecognition. For example, in a voice or recognition system, solid hitsof recognition by comparison of pre-stored voice patterns to incomingdata are determined by looking at a maximum in a template comparisonprocess. Also, in image processing, edge detection by a processoranalyzes intensities in brightness and in color. When intensities riseand then suddenly fall, a maximum is detected which indicates an edgefor purposes of image processing.

In this way, an arithmetic logic unit, an instruction decoder, anaccumulator and an additional register are combined. The additionalregister is connected to the arithmetic logic unit so that thearithmetic logic unit supplies a first arithmetic value to theaccumulator and then supplies to the register in response to a commandfrom the instruction decoder the lesser or greater in value of thecontents of the additional register and the contents of the accumulator.Repeated execution of the command upon each of a series of arithmeticvalues supplied over time to the accumulator supplies the register witha minimum or maximum value in the series of arithmetic values.

It is critically important in many real time systems to find a maximumor minimum with as little machine cycle overhead as possible. Theproblem is compounded when temporary results of the algorithm are storedin accumulators that have more bits than the word width of a data memorylocation where the current minimum or maximum might be stored. It isalso compounded by highly pipelined processors when condition testingrequires a branch. Both cases use extra machine cycles. Additionalmachine cycles may be consumed in setting up the addresses on datatransfer operations.

In the preferred embodiment, however, the circuit has ACCB 31 be aparallel register of the same bit width as the accumulator ACC 23. Whenthe minimum or maximum function is executed, the processor compares thelatest values in the accumulator with the value in the parallel registerACCB and if less than the minimum or greater than the maximum, dependingon the instruction, it writes the accumulator value into the parallelregister or vice versa. This all executes with a single instruction wordin a single machine cycle, thus saving both code space and programexecution time. It also requires no memory addressing operations and itdoes not affect other registers in the ALU.

FIG. 29 illustrates a pipeline organization of operational steps of theprocessor core 13, 15 of device 11. The steps include fetch, decode,read and execute, which for subsequent instructions are staggeredrelative to a first instruction. Thus, when the pipeline is full, oneinstruction is being executed simultaneously with a second instructionbeing read, a third instruction being decoded and a fourth instructionin the initial phase of fetch. This prefetch, decode, operand-fetch,execute pipeline is invisible to the user. In the operation of thepipeline, the prefetch, decode, operand-fetch, and execute operationsare independent, which allows instructions to overlap. Thus during anygiven cycle, four different instructions can be active, each at adifferent stage of completion. Each pipeline break (e.g., branch, callor return) requires a 2 to 3 cycle pipeline loading sequence asindicated by cycles 1, 2, and 3 of FIG. 29. To improve the codeefficiency when a program requires a high number of branches or otherdiscontinuities in the program addressing, the instruction set includescertain additional instructions.

For example, a delayed branch when executed completes the execution ofthe next two instructions. Therefore, the pipeline is not flushed. Thisallows an algorithm to execute a branch in two cycles instead of fourand the code lends itself to delayed branches. A status condition for abranch is determined by instructions previous to a delayed branch.Instructions placed after the branch do not affect the status of thebranch. This technique also applies to subroutine calls and returns. Thedelayed branch instructions also support the modification of auxiliaryregisters.

Pipeline operation is protected against interrupt such that allnon-recoverable operations are completed before interrupt is taken.

To further improve the performance of the pipeline, the processorhandles two kinds of conditional instructions. Conditional subroutinecalls and returns help in error and special condition handling. If acondition is true, the call or return is executed. The format forconditional call and return pneumonic are Cxxxx where xxxx is thecondition code; CGEZD: call greater than or equal delay; Rxxxx wherexxxx is the condition code; and RIOZ: return on BIO PIN LOW.

Conditional instructions advantageously improve coding of high samplingfrequency algorithms, for example. They allow conditional execution ofthe next one or the next two following instructions with a very lowcycle overhead. The test conditions are the same as for branchinstructions. The first instruction following a conditional instructiondoes not modify auxiliary registers and does not reload the programcounter 93. These restrictions do not apply for the second conditionalinstruction. The format for the conditional instruction mnemonic isCExxxx where xxxx is the condition code, and CEGEZ: execute nextinstruction(s) if greater than equal. If the test is true, the nextinstruction(s) are executed. If the condition is false, each conditionedinstruction is replaced by a NOP.

The following code shows an example of conditioning instruction use:SUBB Y0; CEGEZ 2; SUBB X0; SACL * +. If the test condition is true thetwo instructions SUBB and SACL are executed. If not, they are replacedby a NOP.

When the pipeline is full and continually being fed with instructions,it is as shown in columns 4 and 5 of FIG. 29, filled with fourinstructions continually. In FIG. 30, the fully loaded column is shownlaid over horizontal with instructions A, B, C and D therein. When aconditional instruction Ccnd is in the pipeline and the condition is notmet, only one cycle is lost. However, as shown in the lower pan of FIG.30, a conventional instruction causes a branch and requires reloading ofthe pipeline as in cycle 1 and thus require four cycles to reload thepipeline. This is called a pipeline hit. Consequently, as FIG. 30illustrates, the conditional instruction affords a savings of threecycles of processor time.

Arithmetic operations benefit by introducing conditional instructions.For example, if a positive number X is multiplied by a negative numberY, the desired answer is a negative number Z. To obtain this result, theoperations conventionally might include determining the absolute valueof -Y to recover Y and then multiplying by X to determine Z and thennegating Z to obtain -Z. Determining whether or not the number isnegative involves a sign condition which can cause a pipeline hit. Asecond example is in execution of double precision addition orsubtraction. If a double precision number (W,X) is to be added to adouble precision number (Y,Z) the first step would be to add W+Y andthen X+Z. However, if the condition is true that there is a carryresulting from the addition X+Z, then the sum W+Y should be modified tobe W+Y+C (carry). The computation unit 15 thus acts as a circuit havingstatus conditions wherein a particular set of the status conditions canoccur in operation of the circuit. Some status conditions, for example,are Z) accumulator equal to 0, L) accumulator less than 0, V) overflowand C) carry.

The instruction register IR of FIGS. 1A and 31 is operative to hold aconditional instruction directing control circuit 225 to execute afurther operation provided that the particular status condition ispresent. Line 1026 carries signals indicative of the actual status ofaccumulator 23 back to decoder 221 or control 225. The decoder decodesthe instruction register and control circuit 225 is connected to theprocessor to cause it to execute a further operation when a particularstatus condition is present and otherwise to cause the circuit to omitthe further operation. In this way, a branch is avoided and no pipelinehit occurs.

The instruction register also includes sets of bits 1021 and 1023interpreted as status and mask bits of FIG. 32 when a conditionalinstruction is present in the I.R. In other words, decoder 221 isenabled by the presence of a conditional instruction to decode thepredetermined bit locations 1021 as status bits and the predeterminedbit locations 1023 as mask bits. Decoder 221 decodes the predeterminedmask location corresponding to the status conditions to selectivelyrespond to the certain ones of the predetermined status conditions whenthe conditional instruction is present in the instruction register. Inthis way, the processor is able to perform high sample rate algorithmsin a system that has an analog-to-digital converter A/D 1003 convertingthe output of a sensor 1005 for the processor. The processor executeshigh precision arithmetic and supplies the results to a video outputcircuit 1007 that drives a CRT 1009.

In FIG. 32, the mask bits 1023 predetermine the accumulator status towhich the conditional instruction is responsive. The status bits 1021predetermine the way in which the condition is interpreted. Note thatstatus bits 1021 are not sensed bits from line 1026. For example, maskbits 1023 are "1101", meaning that accumulator overflow status isignored and all other statuses are selected. Status bits 1021 are"1001", meaning that the actual accumulator condition is compared toACC=0 AND NOT (ACC<0) and CARRY. In other words, the zero (0) in theACC<0 bit L of FIG. 32 sensitizes the circuitry to the logicalcomplement NOT ACC<0 (or ACC greater than zero). If this threefoldcondition is met, the conditional instruction is operative in thisexample.

In a further advantage of the use of these remarkable conditionalinstructions, FIG. 33 shows that implementing many short instructionswithout the status or mask bits 1021 and 1023 results in a largerdecoder being required to decode the numerous different instructions.However, in FIG. 34 with one longer conditional instruction (illustratedas a conditional branch instruction), the use of status and mask bitsresults in a smaller decoder 1025 than would otherwise be required. Thishardware gives the status and mask option to the assembler which has thecapability of doing large numbers of options and generates the correctbit pattern that would have to be done in decoder PLA on a conventionalprocessor. In this way, the decode period is shortened and there arefewer transistors in the decode systems. Decode of the branchinstruction is sped up, fewer transistors are required for theimplementation and there is greater flexibility.

In the conditional branch instruction feature, a branch is sometimesrequired. However, pipeline hits are minimized by conjoining variousstatus conditions as in FIG. 32. For example, in extended precisionarithmetic, in doing an add, it may be necessary to look at the carrybit if there is a positive value, but there is no need to do anoperation based on there being a negative value. Therefore, theconditional branch instruction senses the simultaneous presence of bothcarry and positive conditions as shown in FIG. 32.

In FIG. 34, an operation circuit such as computation unit 15 of FIGS. 1Aand 34 acts as a circuit that has status conditions wherein a particularset of status conditions can occur in operation of the circuit.Instruction register IR holds a conditional branch instruction that isconditional on a particular set of the status conditions. The decoder1025 is connected to instruction register IR and operation circuit 15.Then the program counter 93 is coupled to decoder 1025 via a MUX 1027 sothat a branch address ADR is entered into the program counter 93 inresponse to the branch instruction when the particular set of the statusconditions of the circuit 15 are present. Otherwise, MUX 1027 selectsclock pulses which merely increment the program counter. In many cases,not all of the status conditions will be actually occurring in circuit15 and no branch occurs, thus avoiding a pipeline hit. The programcounter 93 contents are used to address the program memory 61 which thenenters a subsequent instruction into the instruction register IR.

The conditional instructions are advantageously utilized in anyapplication where there is insufficient resolution in the word length ofthe processor in the system and it is desired to use double or highermultiple precision. For example, audio operations often require morethan 16 bits. In a control algorithm, some part of the control algorithmmay require more than 16 bits of accuracy.

FIG. 35 shows a specific example of logic for implementing the statusand mask bits 1021 and 1023 of FIGS. 31, 32 and 34. In FIG. 35, theactual status of operation circuit 15 ((ACC=0), (ACC<0), overflow,(CARRY)) is compared in exclusive OR gates 1031.1, 1031.2, 1031.3 and1031.4 with the status bits Z, L, V and C of the status register 1021.If the status is actually occurring, then the respective XOR gatesupplies as active low to its corresponding AND gate 1033.1, 1033.2,1033.3 or 1033.4. An additional input of each of the AND gates 1033 isqualified or disabled by with a corresponding high active mask bit Z, L,V or C. In this way, only the appropriate conditions are selectivelyapplied to a logic circuit 1035 which selects for the appropriateconjunctions of conditions to which the conditional set is sensitive. Ifthe conjunction of conditions is present, then a branch output of logic1035 is activated to the control circuit 225 of FIG. 34,

FIG. 36 shows a pin-out or bond-out option for device 11. In FIG. 36,device 11 is terminated in an 84 pin CERQUAD package. The pin functionsare described in a SIGNAL DESCRIPTIONS appendix hereinbelow.Advantageously, the arrangement of terminals and design of this pin-outconcept prevents damage to device 11 even when the chip is mistakenlymisoriented in a socketing process.

As shown in FIG. 37, the chip package can be oriented in any one of fourdirections 1041A, 104lB, 1041C and 1041D. Device 11 is an example of anelectronic circuit having a location for application of power supplyvoltage at seven terminals V_(cc1-7). There are also seven ground pinsV_(ss1-7). The numerous leads are used to apply power to different areasof device 11 to isolate inputs and internal logic from output driverswhich are more likely to produce noise. Especially on very high speedprocessors, substantial currents can be drawn which causes voltages onthe printed circuit ground plane. The buses that switch hard and fastare thus isolated from buses that are not switching. Address and dataare isolated from control lines so that when they switch hard and fastwherein all the addresses switch at the same time, it will not affectthe other bus because the ground is isolated. Likewise, other outputpins that are not memory oriented or have to be stable at the times thataddressing is occurring are also not affected because of the isolation.Therefore, the isolation of the ground and power plane is optimized sothat hard switching devices do not cause noise on pins that are notswitching at that time and need to be stable in voltage.

The exemplary embodiment of FIG. 36 is an 84 pin J-leaded device whereinthe terminals comprise contact surfaces adapted for surface mounting.The terminals are physically symmetric with quadrilateral symmetry.

In FIGS. 36 and 37, the symmetrical placement of the power and groundpins is such that any of the four orientations of the device causes thepower and ground pins to plug into other power and ground pinsrespectively. In a further advantageous feature, a disabling terminaldesignated as the OFF- pin is provided so that any placement of thedevice 11 other than the correct orientation automatically aligns thislow active OFF- pin to a ground connection on printed circuit board1043. When the OFF- pin is driven low, then all outputs of device 11 aretristated so that none of the outputs can be driving against anythingelse in the system. In this way, device 11 responds to application ofthe ground voltage to the disabling terminal for non-destructivelydisabling the electronic circuitry of the device 11.

Put another way, the chip carrier of FIG. 36 is an example of a keylessdevice package for holding the electronic circuit and includes terminalssecured to the device package for the supply voltage output locationsand disable terminal wherein every turning reorientation of the entireelectronic device which translates the terminals to each othertranslates a terminal for supply voltage to another terminal for supplyvoltage. Likewise, terminals for ground are either translated to otherterminals for ground or to the terminal for disablement. In someembodiments, it may be desirable to make the disable terminal highactive and in those embodiments, the disabled terminal is translated toa supply voltage terminal for this disabling purpose.

The range of applications of this pin-out concept is extremely broad.The device 11 can be any electronic device such as a digital signalprocessor, a graphic signal processor, a microprocessor, a memorycircuit, an analog linear circuit, an oscillator, a resistor pack, orany other electrical circuit. The device package suitably is provided asa surface mount package or a package with pins according to thesingle-in-line design or dual in-line design. The protective terminalarrangement improvement applies to cable interconnects, a printedcircuit board connecting to a back plane or any electrical componentinterconnection with symmetrical connection.

In FIG. 38, an automatic chip socketing machine 1051 is provided with PCboards 1043 and devices 11 for manufacturing assembly of final systems.If the devices 11 are mistakenly misoriented in the loading of socketingmachine 1051, there is no damage to the chip upon reaching testapparatus 1053 even though the chip orientation is completely incorrectin its placement on the board 1043.

It would be undesirable for misorientation of the device to allowvoltages to be applied in test area 1053 which execute a strain on theoutput drivers of the device as well as possibly straining some of thecircuits of other chips on the printed circuit board 1043. Such strainmight result in shorter lifetimes and a not insignificant reliabilityissue for the system. Advantageously, as indicated in the processdiagram of FIG. 39, this reliability issue is obviated according to thepin-out of the preferred embodiment of FIG. 36.

In this processing method, operations commence with a START 1061 andproceed to a step 1063 to load the circuit boards 1043 into machine1051. Then, in a step 1065, keyless devices 11 are loaded into machine1051. Next, in a step 1067, machine 1051 is operated and the devices aresocketed in a step 1069. Subsequently, in test area 1053, the boardassemblies are energized in step 1071 of FIG. 39. Test equipmentdetermines whether the assemblies are disabled in their operation. Thisstep is process step 1073. If not, then a step 1075 passes on thecircuit assemblies which have been electrically ascertained to be freeof disablement to further manufacturing or packaging steps since thesecircuit assemblies have proper orientation of the keyless electronicdevices.

If any of the circuit boards 1043 has misoriented devices, then testequipment 1053 determines which circuit assemblies are disabled in step1073 of FIG. 39 and operations proceed to a step 1077 to reorient thedevices 11 on the printed circuit boards 1043 and to reload the keylessdevices starting with step 1065. Operations then pass from both steps1075 and 1077 to step 1063 for re-execution of the process.

In FIG. 40, another preferred embodiment of the pin-out feature isimplemented in a single in-line chip wherein multiple power terminalsVCC and ground are provided. In this way, if the chip is reversed, thepower pins and ground pins are still lined up. An OFF-pin translates toa ground pin on the symmetrically opposite side of this single in-linepackage.

In FIG. 41, the single in-line concept has an odd number of pins withthe power pin VCC supplied to the center of symmetry. A ground pin is ata symmetrically opposite end of the chip from the disabling terminalOFF-. Then, when the chip is tested after assembly and the system is notworking, the manufacturer can reorient the chip and not have to beconcerned about possibly having damaged the chip or the printed circuitassembly into which it has been introduced.

FIG. 42 shows a sketch of terminals on a dual in-line package. Crossedarrows illustrate the translation concept of the reorientation. It is tobe understood of course that reorientation does not connect terminals toterminals. Reorientation instead connects terminals on the chip, whichhave one purpose, to corresponding contacts on the board that have thepurpose for which a symmetrically opposing pin on the chip is intended.In this way, the concept of translation of terminals to terminals iseffective to analyze the advantages of the preferred embodiments of thispin-out improvement.

As indicated in the sketch of FIG. 43, the further embodiments of thepin-out improvement are applicable to pin grid array (PGA) terminal andpackage configurations.

In still other embodiments wherein the terminals have four possibleorientations, the terminals suitably include at least one powerterminal, an odd number of ground terminals, and at least one disableterminal or a whole number multiple.

In still other embodiments, the terminals include ground and disableterminals and have a number of possible orientations wherein the sum ofthe number of ground terminals and the number of disable terminals isequal to or is a whole number multiple of the number of possibleorientations.

Structurally on chip, the preferred embodiment as thus far described hasthe disabling circuitry to force all the pins to float. In still otherembodiments, all output pins translate to other output pins. All VCCpins translate to other VCC pins and all ground pins translate to otherground pins. Any pin can translate to a no-connect pin.

Where all-hardware embodiments have been shown herein, it should beunderstood that other embodiments of the invention can employ softwareor microcoded firmware. The process diagrams herein are alsorepresentative of flow diagrams for software-based embodiments. Thus,the invention is practical across a spectrum of software, firmware andhardware.

While this invention has been described with reference to illustrativeembodiments, this description is not intended to be construed in alimiting sense. Various modifications of the illustrative embodiments,as well as other embodiments of the invention, will be apparent topersons skilled in the art upon reference to this description. It istherefore contemplated that the appended claims will cover any suchmodifications or embodiments as fall within the true scope of theinvention.

      INSTRUCTION MNEU OPCODE IMMEDIATE       LOAD AR FROM ADDRESSED DATA LAR 0000 0A RX |A A A A A A A     ADD TO AR CHORT IMMEDIATE ADRK 0000 1000 |||.v     ertline. |||| SUBTRACT FROM AR SHORT     IMMEDIATE SBRK 0000 1001 ||||     |||| MODIFY AUXILIARY REGISTER MAR   0    0     00 1010 |A A A A A A A EXCLUSIVE OR DBMR TO DATA VALUE XPL 0000     1011 |A A A A A A A OR DBMR TO DATA VALUE OPL 0000 1100     |A A A A A A A AND DBMR WITH DATA VALUE APL 0000 1101 |A      A A A A A A COMPARE DBMR TO DATA VALUE CPL 0000 1111 |A A A A     A A A TEST BIT SPECIFIED IMMEDIATE BIT 0001 BITX |A A A A A A A     LOAD ACCUMULATOR WITH SHIFT LAC 0010 SH FT |A A A A A A A ADD     TO ACCUMULATOR WITH SHIFT ADD 0011 SH FT |A A A A A A A     SUBTRACT FROM ACCUMULATOR WITH SHIFT SUB 0100 SH FT |A A A A A     A A ZERO ACC, LOAD HIGH ACC WITH ROUNDING ZALR 0101 0000 |A A A     A A A A ZERO ACC, LOAD HIGH ACCUMULATOR ZALH 0101 0001 |A A A A     A A A ZERO ACC, LOAD LOW ACC WITH SIGN SUPPRESSION ZALS 0101 0010     |A A A A A A A LOAD ACC WITH SHIFT SPECIFIED BY TREG1 LACT 0101     00 11 |A A A A A A A MULTIPLY DATA VALUE TIMES TREG0 MPY 0101   0    0     01 |A A A A A A A MULTIPLY UNSIGNED DATA VALUE TIMES TREG0 MPYU     0101 0101 |A A A A A A A TEST BIT IN DATA VALUE AS SPECIFIED BY     TREG2 BITT 0101 0110 |A A A A A A A NORMALIZE ACCUMULATOR NORM  1    0     0 0111 |A A A A A A A LOAD STATUS LST 0101 1000 |A A A     A A A A LOAD STATUS REGISTER 1 LST1 0101 1001 |A A A A A A A     MULT/ACC WITH SOURCE ADDRESS IN DBMR MADS 0101 1010 |A A A A A     A A MULT/ACC WITH SOURCE ADRS IN DBMR AND DMOV MADD 0101 1011 |A      A A A A A A BLOCK MOVE DATA TO DATA WITH SOURCE IN DBMR BDSD 0101 1100     |A A A A A A A BLOCK MOVE DATA TO DATA WITH DEST IN DBMR BDDD   0    1     01 1101 |A A A A A A A BLOCK MOVE DATA TO PROG WITH SOURCE IN     DBMR BPSD 0101 1110 |A A A A A A A BLOCK MOVE DATA TO DATA DEST     LONG IMMEDIATE BKDK 0101 1111 |A A A A A A A A A A A A A A A A     A A A A A A A ADD TO ACCUMULATOR WITH CARRY ADDC 0110 0000 |A A     A A A A A ADD TO HIGH ACCUMULATOR ADDH 0110 0001 |A A A A A A A     ADD TO LOW ACCUMULATOR WITH SIGN SUPPRESSED ADDS 0110 0010 |A A     A A A A A ADD TO ACC WITH SHIFT SPECIFIED BY TREG1 ADDT 0 110 0011     |A A A A A A A MULTIPLY TREG0 BY DATA,ADD PREVIOUS PRODUCT MPYA     0110 0100 |A A A A A A A DATA TO TREG0, SQUARE IT, ADD PREG TO     ACC SQRA 0110 0101 |A A A A A A A LOAD TREG0 AND ACCUMULATE     PREVIOUS PRODUCT LTA 0110 0110 |A A A A A A A LOAD TREG0 WITH     DATA SHIFT, ADD PREG TO ACC LTD 0110 0111 |A A A A A A A LOAD     TREG0 LT 0110 1000 |A A A A A A A LOAD TREG0 AND LOAD ACC WITH     PREG LTP 0110 1001 |A A A A A A A EXCLUSIVE OR ACCUMULATING     WITH DATA VALUE XOR 0110 1010 |A A A A A A A OR ACCUMULATOR     WITH DATA VALUE OR 0110 101 1 |A A A A A A A AND ACCUMULATOR     WITH DATA VALUE AND 0110 1100 |A A A A A A A TABLE WRITE TBLW   1    0     01 1101 |A A A A A A A RESERVED RESERVED SUBTRACT FROM ACCUMULAT     OR WITH BORROW SUBB 0111 0000 |A A A A A A A SUBTRACT FROM HIGH     ACCUMULATOR SUBH 0111 0001 |A A A A A A A SUBTRACT FROM ACC     WITH SIGN SUPPRESSED SUBS 0111 0010 |A A A A A A A SUBTRACT     FROM ACC, SHIFT SPECIFIED BY TREG1 SUBT 0111 0011 |A A A A A A     A MULTIPLY TREG0 BY DATA, ACC - PREG MPYS 0111 0100 |A A A A A     A A DATA TO TREG0, SQUARE IT, ACC - PREG SQRS 0111 0101 |A A A     A A A A LOAD TREG0 AND SUBTRACT PREVIOUS PRODUCT LTS 0111 0110 |A      A A A A A A CONDITIONAL SUBTRACT SUBC 0111 0111 |A A A A A A A     REPEAT INSTRUCTION AS SPECIFIED BY DATA RPT 0111 1000 |A A A A     A A A LOAD DATA PAGE POINTER WITH ADDRESSED DATA LDP 0111 1001 |A      A A A A A A PUSH DATA MEMORY VALUE ONTO PC STACK PSHD 0111 1010     |A A A A A A A DATA MOVE IN DATA MEMORY DMOV 0111 1011 .vertline     .A A A A A A A LOAD HIGH PRODUCT REGISTER LPH 0111 1100 |A A A     A A A A RESERVED RESERVED RESERVED STORE LOW ACCUMULATOR WITH SHIFT SACL     1000 0SH F |A A A A A A A STORE HIGH ACCUMULATOR WITH SHIFT     SACH 1000 1 SH F |A A A A A A A STORE AAR TO ADDRESSED DATA SAR     1001 0A RX |A A A A A A A STORE STATUS SST 1001 1000 |A      A A A A A A STORE STATUS REGISTER 1 SST1 1001 1001 |A A A A A     A A TABLE READ TBLR 1001 1010 |A A A A A A A STORE LOW PRODUCT     REGISTER SPL 1001 1011 |A A A A A A A STORE HIGH PRODUCT     REGISTER SPH 1001 1100 |A A A A A A A POP STACK TO DATA MEMORY     POPD 1001 1101 |A A A A A A A BLOCK MOVE PROG TO DATA WITH     SOURCE IN DBMR BPDS 1001 1110 |A A A A A A A BLOCK MOVE FROM     PROGRAM TO DATA MEMORY BLKP 1 001 1111 |A A A A A A A A A A A A     A A A A A A A A A A A MULTIPLY/ACCUMULATE MAC 1010 0000 |A A A     A A A A A A A A A A A A A A A A A A A A MULTIPLY/ACCUMULATE WITH DATA     SHIFT MACD 1010 0001 |A A A A A A A A A A A A A A A A A A A A A     A A BRANCH UNCONDITIONAL WITH AR UPDATE B 1010 0010 |A A A A A     A A A A A A A A A A A A A A A A A A CALL UNCONDITIONAL WITH AR UPDATE     CALL 1010 0011 |A A A A A A A A A A A A A A A A A A A A A A A     BRANCH AR = 0 WITH AR UPDATE BANZ 1010 0100 |A A A A A A A A A     A A A A A A A A A A A A A A BRANCH UNCONDITIONAL WITH AR UPDATE DELAYED     BD 1010 0101 |A A A A A A A A A A A A A A A A A A A A A A A     CALL UNCONDITIONAL WITH AR UPDATE DELAYED CALD 1010 0110 |A A A     A A A A A A A A A A A A A A A A A A A A BRANCH AR = 0 WITH AR UPDATE     DELAYED BAZD 1010 0111 |A A A A A A A A A A A A A A A A A A A A     A A A LOAD MEMORY MAPPED REGISTER LMMR 1010 1000 |A A A A A A A     A A A A A A A A A A A A A A A A STORE MEMORY MAPPED REGISTER SMMR 1010   0    1     10 | A A A A A A A A A A A A A A A A A A A A A A A BLOCK MOVE     FROM DATA TO DATA MEMORY BLKD 1010 1010 |A A A A A A A A A A A     A A A A A A A A A A A A STORE LONG IMMEDIATE TO DATA SPLK 1010 1011     |A A A A A A A ||||     |||| |||.v     ertline. |||| EXCLUSIVE OR LONG     IMMEDIATE WITH DATA VALUE XPLK 1010 1100 |A A A A A A A     |||| |||.v     ertline. |||| ||.ve     rtline.| OR LONG IMMEDIATE WITH DATA VALUE OPLK 1010 1101     |A A A A A A A ||||     |||| |||.v     ertline. |||| AND LONG IMMEDIATE     WITH DATA VALUE APLK 1010 1110 |A A A A A A A |.vertlin     e.|| |||| .vertline     .||| ||||     COMPARE DATA WITH LONG IMMEDIATE SET TC IF = CPLK 1010 1111 |A     A A A A A A |||| ||     || |||| |.     vertline.|| LOAD AR SHORT IMMEDIATE LARK 1011 0A RX     |||| |||.v     ertline. ADD TO LOW ACC SHORT IMMEDIATE ADDK 1011 1000 |.vertlin     e.||  |||| LOAD     ACC SHORT IMMEDIATE LACK 1011 1001 |||.vertlin     e. |||| SUBTRACT FROM ACC SHORT     IMMEDIATE SUBK 1011 1010 ||||     |||| REPEAT INST SPECIFIED BY SHORT     IMMEDIATE PRTK 1011 1011 ||||     |||| LOAD DATA PAGE IMMEDIATE LDPK   1    1     10 1101 |||| ||.ver     tline.| SHORT IMMEDIATES ABSOLUTE VALUE OF ACCUMULATOR ABS 1011     1110 0000 0000 COMPLEMENT ACCUMULATOR CMPL 1011 1110 0000 0001 NEGATE     ACCUMULATOR NEG 1011 1110 0000 0010 LOAD ACCUMULATOR WITH PRODUCT PAC    1     101 11 10 0000 0011 ADD PRODUCT TO ACCUMULATOR APAC 1011 1110 0000 0100     SUBTRACT PRODUCT FROM ACCUMULATOR SPAC 1011 1110 0000 0101 ADD BPR TO     ACCUMULATOR ABPR 1011 1110 0000 0110 LOAD ACCUMULATOR WITH BPR LBPR 1011     1110 0000 0111 SUBTRACT BPR FROM ACCUMULATOR SBPR 1011 1110 0000 1000     SHIFT ACCUMULATOR 1 BIT LEFT SFL 1011 1110 0000 1001 SHIFT ACCUMULATOR 1     BIT RIGHT SFR 1011 1110 0000 1010 ROTATE ACCUMULATOR 1 BIT LEFT ROL 1011     1110 0000 1100 ROTATE ACCUMULATOR 1 BIT RIGHT ROR 1011 1110 0000 1 101     ADD ACCB TO ACCUMULATOR ADDR 1011 1110 0001 0000 ADD ACCB TO ACCUMULATOR     WITH CARRY ADCR 1011 1110 0001 0001 AND ACCB WITH ACCUMULATOR ANDR 1011  1    1     1 0001 0010 OR ACCB WITH ACCUMULATOR ORR 1011 1110 0001 0011 ROTATE ACCB     AND ACCUMULATOR LEFT ROLR 1011 1110 0001 0100 ROTATE ACCB AND ACCUMULATOR      RIGHT RORR 1011 1110 0001 0101 SHIFT ACCB AND ACCUMULATOR LEFT SFLR     1011 1110 0001 0110 SHIFT ACCB AND ACCUMULATOR RIGHT SFRR 1011 1110 0001     0111 SUBTRACT ACCB FROM ACCUMULATOR SUBR 1011 1110 0001 1000 SUBTRACT     ACCB FROM ACCUMULATOR WITH CARRY SBBR 1011 1110 0001 1001 EXCLUSIVE OR     ACCB WITH ACCUMULATOR XORR 1011 1110 0001 1010 STORE ACC IN ACCB IF ACC     > ACCR CRGT 1011 1110 0001 1011 STORE ACC IN ACCB IF ACC < ACCR CRLT     1011 1110 0001 1100 EXCHANGE ACCR WITH ACCUMULATOR EXAR 1011 1110 0001   0    1     11 STORE ACCUMULATOR IN ACCB SACR 1011 1110 0001 1110 LOAD ACCUMULATOR     WITH ACCB LACR 1011 1110 0001 1111 BRANCH ADDRESSED BY ACC BACC 1011     1110 0010 0000 BRANCH ADDRESSED BY ACC DELAYED BACD 1011 1110 0010 000 1     IDLE IDLE 1011 1110 0010 0010 PUSH LOW ACCUMULATOR TO PC STACK PUSH 1011     1110 0011 0000 POP PC STACK LOW ACCUMULATOR POP 1011 1110 0011 0001 CALL     SUBROUTINE ADDRESSED BY ACC CALA 1011 1110 0011 0010 CALL SUBROUTINE     ADDRESSED BY ACC DELAYED CLAD 1011 1110 0011 0011 TRAP TO LOW VECTOR     TRAP 1011 1110 0011 0100 TRAP TO LOW VECTOR DELAYED TRPD 1011 1110 0011  1    0     0 EMULATOR TRAP TO LOW VECTOR DELAYED ETRP 1011 1110 0011 0111 RETURN     FROM INTERRUPT RETI 1011 1110 0011 1000 RETURN FROM INTERRUPT DELAYED     RTID 1011 1110 0011 1001 RETURN FROM INTERRUPT WITH ENABLE RETE 1011     1110 0011 1010 RETURN FROM INTERRUPT WITH ENABLE DELAYED RTED 1011 1110  0    1     0 1011 GLOBAL INTERRUPT ENABLE EINT 1011 1110 0100 0000 GLOBAL INTERRUPT     DISABLE DINT 1011 1110 0100 0001 RESET OVERFLOW MODE ROVM 1011 1110 0100     0010 SET OVERFLOW MODE SOVM 1011 1110 0100 0011 CONFIGURE BLOCK AS DATA     MEMORY CNFD 1011 1110 0100 0100 CONFIGURE BLOCK AS PROGRAM MEMORY CNFP   1    1     10 1110 0100 0101 RESET SIGN EXTENSION MODE RSXM 1011 1110 01 00 0110     SET SIGN EXTENSION MODE SSXM 1011 1110 0100 0111 SET XF PIN LOW RXF 1011     1110 0100 0100 SET XF PIN HIGH SXF 1011 1110 0100 1101 RESET CARRY RC    1     101 1110 0100 1110 SET CARRY SC 1011 1110 0100 1111 RESET TC BIT RTC     1011 1110 0100 1110 SET TC BIT STC 1011 1110 0100 1111 RESET HOLD MODE     RHM 1011 1110 0100 1000 SET HOLD MODE SHM 1011 1110 0100 1001 STORE     PRODUCT IN BPR SPB 1011 1110 0100 1100 LOAD PRODUCT FROM BPR LPB 1011    0     111 0100 1101 LONG IMMEDIATES MULTIPLY LONG IMMEDIATE BY TREG0 MRKL 1011     1110 1000 0000 |||| |.vertli     ne.|| ||||     |||| AND WITH ACC LONG IMMEDIATE     ANDK 1011 1110 1000 0001 ||||     |||| |||.v     ertline. |||| OR WITH ACC LONG     IMMEDIATE ORK 1011 1110 1000 0010 |||.vertline     . |||| |||     | |||| XOR WITH ACCUMULATOR     LONG IMMEDIATE XORK 1 011 1110 1000 0011 |||.v     ertline. |||| ||.ve     rtline.| |||| REPEAT NEXT     INST SPECIFIED BY LONG IMMEDIATE RPTR 1011 1110 1000 0100 |.vert     line.|| ||||     |||| |||.v     ertline. CLEAR ACC/PREG AND REPEAT NEXT INST LONG IMMD RPTZ1011 1110     1000 0101 |||| ||.v     ertline.| |||| |.ve     rtline.|| BLOCK REPEAT RPTB 1011 1110 1000 0110     |||| |||.v     ertline. ||| | ||.v     ertline.| SET PREG SHIFT COUNT SPM 1011 1111 00PM 0000 LOAD ARP     IMMEDIATE LARP 1011 1111 0A RP 0010 COMPARE AR WITH CMPR CMPR 1011 1111  A     0 RX 0100 LOAD AR LONG IMMEDIATE LRLK 1011 1111 0A RX 0101 |.ver     tline.|| ||||     |||| |||.v     ertline. BARREL SHIFT ACC RIGHT BSAR 1011 1111 SH IF 1000 LOAD ACC LONG     IMMEDIATE WITH SHIFT LALK 1011 1111 SH FT 1001 ||.vertl     ine.| |||| |.vertli     ne.|| ||||  ADD TO     ACC LONG IMMEDIATE WITH SHIFT ADLK 1011 1111 SH FT 1010 |.vertli     ne.|| ||||     |||| |||.v     ertline. SUBTRACT FROM ACC LONG IMMEDIATE WITH SHIFT SBLK 1011 1111 SH     FT 1011 |||| ||.ver     tline.| |||| |.vert     line.|| AND WITH ACC LONG IMMEDIATE WITH SHIFT ANDS    1     101 1111 SH FT 1100 |||| |.v     ertline.|| ||||     |||| OR WITH ACC LONG IMMEDIATE WITH     SHIFT ORS 1011 1111 SH FT 1101 ||||     |||| |||.v     ertline. |||| XOR WITH ACC LONG     IMMEDIATE WITH SHIFT XORS 1011 1111 SH FT 1110 ||.vertl     ine.| |||| |.vertli     ne.|| ||||     MULTIPLY TREG0 BY 13-BIT IMMEDIATE MPYK 1101 ||.vertlin     e.| |||| |.vertline     .|| BRANCH CONDITIONAL Bend 1110 00TP ZLV C ZLV C A A     A A A A A A A A A A A A A A EXECUTE NEXT TWO INST ON CONDITION XC 1110   T    P     01 ZLV C ZLV C A A A A A A A A A A A A A A A A CALL CONDITIONAL CC 1110  0    T     1 ZLV C ZLV C A A A A A A A A A A A A A A A A RETURN CONDITIONAL RETC    0     111 11TP ZLV C ZLV C A A A A A A A A A A A A A A A A BRANCH CONDITIONAL     DELAYED BconD 1111 00TP ZLV C ZLV C A A A A A A A A A A A A A A A A     EXECUTE NEXT TWO INST CONDITIONAL DELAYED ECD 1111 01TP ZLV C ZLV C A A     A A A A A A A A A A A A A A CALL CONDITIONAL DELAYED CCD 1111 10TP ZLV C     ZLV C A A A A A A A A A A A A A A A A RETURN CONDITIONAL DELAYED RTCD    1     111 11TP ZLV C ZLV C A A A A A A A A A A A A A A A A

    __________________________________________________________________________    Signal Descriptions                                                           SIGNAL                                                                              PIN                                                                              I/O/Z                                                                             DESCRIPTION                                                      __________________________________________________________________________    Memory and I/O Interfacing                                                    A15(MSB) O/Z Parallel address bus A15 (MSB) through A0 (LSB).                              Multiplexed                                                      A14          to address external data/program memory or I/O. Placed in        A13          high-impedance state in hold mode. This signal also goes                      into                                                             A12          high-impedance when OFF- is active low.                          A11                                                                           A10                                                                           A9                                                                            A8                                                                            A7                                                                            A6                                                                            A5                                                                            A4                                                                            A3                                                                            A2                                                                            A1                                                                            A0(LSB)                                                                       D15(MSB) I/O/Z                                                                             Parallel data bus D15 (MSB) through D0 (LSB). Multiplexed                     to                                                               D14          transfer data between the core CPU and external                               data/program                                                     D13          memory or I/O devices. Placed in high-impedance state when       D12          not outputting or when RS- or HOLD- is asserted. This                         signal                                                           D11          also goes into high-impedance when OFF- is active low.           D10                                                                           D9                                                                            D8                                                                            D7                                                                            D6                                                                            D5                                                                            D4                                                                            D3                                                                            D2                                                                            D1                                                                            D0(LSB)                                                                       DS-      O/Z Data, program, and I/O space select signals. Always high         PS-          unless low level asserted for communicating to a particular      IS-          external space. Placed in high-impedance state in hold                        mode.                                                                         These signals also goes into high-impedance when OFF- is                      active                                                                        low.                                                             BR-      O/Z Bus request signal. Asserted when accessing external global                   data memory space. READY is asserted to the device when the                   bus is available and the global data memory is available for                  the                                                                           bus transaction. This signal can also be used to extend the                   data                                                                          memory address space by up to 32K words. This signal also                     goes into high-impedance when OFF- is active low.                READY    I   Data ready input. Indicates that an external device is                        prepared                                                                      for the bus transaction to be completed. If the device is                     not                                                                           ready (READY is low), the processor waits one cycle and                       checks                                                                        READY again. READY also indicates a bus grant to an                           external                                                                      device after a BR- (bus request) signal.                         R/w-     O/Z Read/write signal. Indicates transfer direction when                          commun-                                                                       icating to an external device. Normally in read mode                          (high),                                                                       unless low level asserted for performing a write operation.                   Placed in high-impedance state in hold mode. This signal                      also                                                                          goes in to high-impedance when OFF- is active low.               STRB-    O/Z Strobe signal. Always high unless asserted low to indicate                    an                                                                            external bus cycle. Placed in high-impedance state in the                     hold                                                                          mode. This signal also goes into high-impedance when OFF-                     is active low.                                                   HOLD-    I   Hold input. This signal is asserted to request control of                     the                                                                           address, data, and control lines. When acknowledged by                        the processer, these lines go to a high-impedance state.         HOLDA-   O/Z Hold acknowledge signal. Indicates to the external circuitry                  that                                                                          the processor is in a hold state and its address, data, and                   memory                                                                        control lines are in a high impedance state so that they                      are                                                                           available to the external circuitry for access of local                       memory.                                                                       This signal also goes into high-impedance when OFF- is                        active                                                                        low.                                                             MP/MC-   I   Microprocessor/microcomputer mode select pin. If active low                   at reset (microcomputer mode), the pin causes the internal                    program memory to be mapped into program memory space.                        In the microprocessor mode, all program memory is mapped                      externally. This pin is only sampled during reset and the                     mode                                                                          set at reset can be overridden via software control bits.        MSC-     O/Z Microstate complete signal. This signal indicates the                         beginning                                                                     of a new external memory access. The timing of the signal                     is                                                                            such that it can be connected back to the READY signal to                     insert                                                                        a wait state. This signal also goes into high-impedance                       when                                                                          OFF- is active low.                                              Interrupt and Miscellaneous Signals                                           BIO-     I   Branch control input. Polled by BIOZ instruction. If low,                     the device                                                                    executes a branch. This signal must be active during the                      BIOZ                                                                          instruction fetch.                                               IACK-    O/Z Interrupt acknowledge signal. Indicates receipt of an                         interrupt                                                                     and that the program is branching to the interrupt-vector                     location indicated by A15-A0. This signal also goes into                      high-                                                                         impedance when OFF- is active low.                               INT2-    I   External user interrupt inputs. Prioritized and maskable by                   the                                                              INT1-        interrupt mask register and interrupt mode bit. Can be                        polled                                                           INT0-        and reset via the interrupt flag register.                       RS-      I   Reset input. Causes the device to terminate execution and                     forces                                                                        the program counter to zero. When brought to a high level,                    execution begins at location zero of program memory. RS-                      affects various register and status bits.                        XF       O/Z External flag output (latched software-programmable                           signal).                                                                      Used for signalling other processors in multiprocessor con-                   figurations or as a general purpose output pin. This signal                   also                                                                          goes into high-impedance when OFF- is active low. This pin                    is                                                                            set high at reset.                                               Supply/Oscillator Signals                                                     CLKOUT1  O/Z Master clock output signal (CLKIN frequency/4). This signal                   cycles at half the machine cycle rate and therefore it                        operates                                                                      at the instruction cycle rate when operating with one wat                     state.                                                                        This signal also goes into-high-impedance when OFF- is                        active                                                                        low.                                                             CLKOUT2  O/Z Secondary clock output signal. This signal operates at the                    same                                                                          cycle rate as CLKOUT1 but 90 degrees out of phase. This                       signal                                                                        also goes into-high-impedance when OFF- is active low.           X2/CLKIN I   Input pin to internal oscillator from the crystal. If the                     internal                                                                      oscillator is not being used, a clock may be input to the                     device                                                                        on this pin.                                                     X1       O/Z Output pin from the internal oscillator for the crystal. If                   the inter-                                                                    nal oscillator is not used, this pin should be left                           unconnected.                                                                  This signal also goes into high-impedance when OFF- is                        active                                                                        low.                                                             SYNC-    I   Synchronization input. Allows clock synchronization of two                    or                                                                            more devices. SYNC- is an active-low signal and must be                       asserted on the rising edge of CLKIN.                            V.sub.CC1    Seven 5-V supply pins, tied together externally.                 V.sub.CC2                                                                     V.sub.CC3                                                                     V.sub.CC4                                                                     V.sub.CC5                                                                     V.sub.CC6                                                                     V.sub.CC7                                                                     V.sub.SS1    Seven ground pins, tied together externally.                     V.sub.SS2                                                                     V.sub.SS3                                                                     V.sub.SS4                                                                     V.sub.SS5                                                                     V.sub.SS6                                                                     V.sub.SS7                                                                     Serial Port Signals                                                           CLKR     I   Receive clock input. External clock signal for clocking data                  from                                                                          the DR (data receive) pin into the RSR (serial port receive                   shift                                                                         register). Must be present during serial port transfers.         CLKX     I/O Transmit clock input. External clock signal for clocking                      data                                                                          from the XSR (serial port transmit shift register) to the DX                  (data                                                                         transmit) pin. Must be present during serial port transfer.                   This                                                                          signal can be used as an output operating at one half                         CLKOUT.                                                                       This is done be setting the CO bit in the serial port                         control register.                                                DR       I   Serial data receive input. Serial data is received in the                     RSR                                                                           (serial port receive shift register) via the DR pin.             DX       O/Z Serial port transmit output. Serial data transmitted from                     the XSR                                                                       (serial port transmit shift register) via the DX pin. Placed                  in high-                                                                      impedance state when not transmitting. This signal also                       goes                                                                          into high-impedance when OFF- is active low.                     FSR      I   Frame synchronization pulse for receive input. The falling                    edge                                                                          of the FSR pulse initiates the data-receive process,                          beginning                                                                     the clocking of the RSR.                                         FSX      I/O Frame synchronization pulse for transmit input/output. The                    falling edge of the FSX pulse initiates the data-transmit                     process.                                                                      beginning the clocking of the XSR. Following reset, the                       default                                                                       operating condition of FSX is an input. This pin may be                       selected                                                                      by software to be an output when the TXM bit in the status                    register                                                                      is set to 1. This signal also goes into high-impedance when                   OFF- is active low.                                              OFF-     I   Disable all outputs. The OFF signal, when active low, puts                    all                                                                           output drivers in to high-impedance.                             __________________________________________________________________________

BRANCH, CALL AND RETURN INSTRUCTIONS

Notes

1. Delayed instructions reduce overhead by not necessitating flushing ofthe pipeline as non-delayed branches do. For example, the two(single-word) instructions following a delayed branch are executedbefore the branch is taken.

2. All meaningful combinations of the 8 conditions listed below aresupported for conditional instructions:

    ______________________________________                                                            representation                                            Condition           in source                                                 ______________________________________                                        1) ACC=0            (EQ)                                                      2) ACC<>0           (NEQ)                                                     3) ACC<0            (LT)                                                      4) ACC>0            (GT)                                                      5) OV=0             (NOV)                                                     6) OV=1             (OV)                                                      7) C=0              (C)                                                       8) C=1              (NC)                                                      ______________________________________                                    

For example, execution of the following source statement results in abranch if the accumulator contents are less than or equal to zero andthe carry bit is set:

    BconD LEQ,C

Note that the conditions associated with BlOZ, BBZ, BBNZ, BANZ, and BAZDare not combinations of the conditions listed above.

BIT MANIPULATION INSTRUCTIONS

    ______________________________________                                        XPL   EXCLUSIVE OR DBMR with data value                                       OPL   OR DBMR with data value                                                 APL   AND DBMR with data value                                                CPL   if (data value = DBMR) then TC:=1                                       XPLK  EXCLUSIVE OR long immediate constant with data                                value                                                                   OPLK  OR long immediate constant with data value                              APLK  AND long immediate constant with data value                             CPLK  if (long immediate constant = data value) then TC:=1                    SPLK  store long immediate constant in data memory                            BIT   TC:=bit[4-bit immediate constant] of data value                         BITT  TC:=bit[<TREG2>] of data value                                          ______________________________________                                    

Notes

1) Note that the result of a logic operation performed by the PLU iswritten directly back into data memory, thus not disrupting the contentsof the accumulator.

INSTRUCTIONS INVOLVING ACC8, BPR

    ______________________________________                                        Loads/stores                                                                  SACR    store ACC in ACCB unconditionally                                     CRGT    if (ACC>ACCB) then store ACC in ACCB else                                     ACCB→ACC                                                       CRLT    if (ACC<ACCB) then store ACC in ACCB else                                     ACCB→ACC                                                       EXAR    exchange ACC with ACCB                                                LACR    load ACC from ACCB                                                    SPB     copy product register to BPR                                          LPB     copy BPR to product register                                          LBPR    load accumulator with BPR contents                                    Additions/subtractions                                                        ADDR    add ACCB to ACC                                                       ADCR    add ACCB to ACC with carry                                            SUBR    subtract ACCB from ACC                                                SBBR    subtract ACCB from ACC with borrow                                    ABPR    add BPR to accumulator contents                                       SBPR    subtract BPR from accumulator contents                                Logic operations                                                              ANDR    and ACCB with ACC                                                     ORR     OR ACCB with ACC                                                      XORR    exclusive-or ACCB with ACC                                            ______________________________________                                    

What is claimed is:
 1. A signal processing apparatus comprising:ananalog-to-digital converter for producing a digital signal correspondingto an analog input by a conversion process and for producing aninterrupt signal when a conversion is complete; a digital processingdevice havinga memory; and a processor connecting to saidanalog-to-digital converter and responsive to said interrupt signal forentering the digital signal into the memory in alternative processingcontexts identified by a state of said interrupt signal; and saidprocessor including: a multiplier; an arithmetic logic unit; a pluralityof register sets, each of said register sets having a first and secondregister, said first and second registers connected to concurrentlystore identical information during one of the processing contexts, saidfirst register connected to individually participate and be continuouslyavailable in a next of the processing contexts when said first registeris selected thereby enabling the second register to retain saidinformation from said one processing context; and a context switchingcircuit responsive to the state of said interrupt signal and connectedto said first and second registers to alternatively control input andoutput operations of said register set to and from said multiplier andarithmetic logic unit depending on the processing context.
 2. Theapparatus of claim 1 wherein said context switching circuit includes amultiplexer and a control circuit for operating said multiplexer, theprocessor and one of the registers respectively supplying informationfor selection by said multiplexer for the other register.
 3. Theapparatus of claim 1 wherein the first and second registers both haveinputs connected to receive information simultaneously from saidprocessor.
 4. The apparatus of claim 1, said context switching circuitincludingan electronic switch; and, a control circuit; said electronicswitch selectively connecting said processor to the first or secondregister alternatively, depending on the context of operation and saidcontrol circuit.
 5. The apparatus of claim 1, said context switchingcircuit for selectively clocking said first and second registers.
 6. Theapparatus of claim 5, said first and second registers havingoutputsconnected together and to said processor, and said context switchingcircuit for selectively enabling an output operation from said first orsecond register, depending on the context of operation.
 7. The apparatusof claim 1 further comprisinga multiplexor, said first and secondregisters having respective outputs connected to said multiplexor, saidmultiplexor for selectively connecting said outputs to said processorresponsive to said context switching circuit.
 8. The apparatus of claim1 wherein said first register is operated as a main register and saidsecond register is operated as a counterpart register.
 9. The apparatusof claim 1 wherein said first register alternately acts as a mainregister and then a counterpart register while said second registercorrespondingly acts as a counterpart register when said first registeracts as a main register and then acts as a main register when said firstregister acts as a counterpart register.
 10. A signal processingapparatus with context switching including:an analog-to-digitalconverter for producing a digital signal responsive to an input analogsignal and an interrupt signal indicating that the digital signal isavailable for processing; and a digital processing device havingaprocessor for processing said digital signal in alternative processingcontexts identified by a state of said interrupt signal; said processorincluding: a plurality of register sets, each of said register setshaving a first and second register, said first and second registersconnected to concurrently store identical information during one of theprocessing contexts, said first register connected to individuallyparticipate and be continuously available in a next of the processingcontexts when said first register is selected thereby enabling thesecond register to retain said information from said one processingcontext; and a context switching circuit responsive to the state of saidinterrupt signal and connected to said first and second registers toalternatively control input and output operations of said register setto and from said processor depending on the processing context.